• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Greenhorn
Posts: 4
  • 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
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
You didn't tell me he was so big. Unlike this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic