This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSP and the fly likes submitting a form without refreshing it Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply Bookmark "submitting a form without refreshing it" Watch "submitting a form without refreshing it" New topic
Author

submitting a form without refreshing it

payal kapadia
Greenhorn

Joined: Feb 08, 2005
Posts: 10
Hi...

I have another problem. I have a form in which im using onChange function for a select box.
In the function im submitting the form by document.formname.submit();
The problem here is that the entire form is getting refreshed .
Is there a way that i can submit a form and still ensure that the previous values are not lost.

Please help me on this one.
Thanks in advance..
Payal
Vijay Sharma
Ranch Hand

Joined: Feb 02, 2005
Posts: 32
Hi payal,
I think then u have to maintain a session for resolving ur problem.


Vijay Sharma
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56529
    
  14

John,

JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

thanks,
bear
Forum Bartender


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56529
    
  14

Session variables may not be necessary.

I am assuming that the form is re-displayed after the processing servlet has completed whatever it is it's doing? If so, the request parameters submitted by the form are still on the request as parameters and can be put "back into" the form using the form element's value attribute.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: submitting a form without refreshing it
 
Similar Threads
Retaining drop down values on page submit
onLoad function
Handle multiple click of an image hyperlink
help me ASAP
A Design Problem