• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

How a page can be updated without refreshing the page

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually i want to update a particular column named "status" whose default value is "enrolled".
Now there are 3 buttons that i have provide namely "confirmed", "waiting" and "enrolled".
Now after clicking the particular button i want to update the column named status to the particular button clicked i.e suppose i click on confirmed button then status should be changed to confirmed for a particular row and colum.
Now my question is how can i do this without migrating to another page or refreshing the page.
Also the values displayed in table are from database and i am able to update those value easily by connecting it to database but how can i change the particular row and column value without refreshing the page or migrating to another page. Can anybody can give me small example to show how can i achieve it.
Thanks in advance.
 
Greenhorn
Posts: 7
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Dinesh,

This isn't really a JSP-specific question. There are a couple of ways of making this work, but by far the easiest is to use a JavaScript framework to make an AJAX call to retrieve the results of your form posting, then use those results to update the value as necessary. In order to update the live page, you'll update the "DOM" of the webpage using JavaScript.

Again, a framework is the way to go here, you don't want to reinvent the wheel. I highly recommend looking at jQuery. It's powerful, fairly simple once you understand the underlying concepts, widely used, and actively developed and maintained.

Happy coding!

--T
 
No holds barred. And no bars holed. Except this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic