• Post Reply Bookmark Topic Watch Topic
  • New Topic

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
Marshal
Posts: 38277
627
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!