Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Refreshing a particular form  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a .jsp page where I have two forms.
I fetch data from the first form and display it in the second form by onSubmit from the first.
For a particular onclick event of the second form, I have to pass values only from the second form and get the second from refreshed.
i.e., The first form should hold all the values(ex . in the textbox ) remaining the same.
Can someone suggest me how to do it using Javascript ASAP?
Thanks,
sheeba
 
author & internet detective
Sheriff
Posts: 38571
661
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sheeba,
I don't think you can do this using just Javascript. I suppose you could put the values in a cookie, but that is very awkward. The values are being passed to the server. So it would be natural for the server to keep track of them when repainting the page.
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If u need form1 to retain its values, when form1 is submitted.. these two shud be in seperate frames... or else, u will have to resent to a method where u 'store & repopulate' the values of form1 on form2 submit.
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just soemthing I did in the past - you can have hidden iframe, and submit forms into it. Iframe will update the server info, and page will be unchanged. If some changes needed, server may put a javascript back to that iframe. This javascript will update values on the form
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!