File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to print updated form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to print updated form "hidden" field value without refreshing the page/jsp." Watch "How to print updated form "hidden" field value without refreshing the page/jsp." New topic
Author

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

sreelatha sree
Greenhorn

Joined: Jan 26, 2010
Posts: 4
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

Joined: Jan 10, 2002
Posts: 61756
    
  67

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to print updated form "hidden" field value without refreshing the page/jsp.