• 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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
Posts: 39054
714
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
 
permaculture is largely about replacing oil with people. And one tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!