File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to print updated form "hidden" field value without refreshing the page/jsp.

 
sreelatha sree
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need suggestion on how to print the updated form "hidde" field value on JSP screen without refreshing the page. (server side I'm using Struts)
Currently I'm printing one form hidden field as



Here on pageload I have to check some results based on I have to increment this counter on the fly and display.

here server side I'm using Struts, My above form hidden field/testCounter default value is '0'. Since jsp code loads first when I made changes on onload javascript and tried to print the updated form field value '1' its not printing since JSP serverside code is not effecting, it is loaded already before javascript/cliend side code.

I tried using Ajax I sent request on pageload and updated this "testCounter" value on server side but I stuck to get the results back immediately with "updated form hidden field value" to print on the jsp.

When I searched in Google all i found is
- to submit the form using AJAX whithout refreshing the page and getting the results back as simple text printing on the screen as "Thank you for visiting" etc...

Could any one please help me ASAP to get Ajax response with updated form field values to print on JSP immediately without refreshing the page, or any solution other than AJAX in this case.

any advice and/or sample code will be greatly appreciated. thank you.

-sree
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic