[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Preserving form data using history.back()

Posted on 2004-11-06
9
Medium Priority
?
369 Views
Last Modified: 2008-01-09
I have a form with several select menus., onSubmit to the next page, i want to confirm the selected what was entered on the previous page.
if the user decides to edit the data, i have a button which uses history.back() function.

Just on testing on IE, Data is preserved and in few computers with different versions of IE it isnt. I'm aware that we cannot rely on all browsers to remember values, however if it works in Netscape and IE i'll be more than happy.

whats the difference between history.back() and history.go(-1)? Could that be a factor?

Thanks
0
Comment
Question by:nouman2000
  • 5
  • 3
8 Comments
 
LVL 30

Expert Comment

by:VirusMinus
ID: 12513887
These could help ->

http://www.msdn.microsoft.com/workshop/author/persistence/overview.asp

http://www.msdn.microsoft.com/workshop/author/persistence/howto/formdata.asp

Other alternatives are:

* use cookies on submit and read back
* use a server side language like ASP
* make sure all the data is collected correctly using Javasscript Validation and only then let users proceed
0
 
LVL 30

Expert Comment

by:VirusMinus
ID: 12513900
and there is no difference between history.back() and history.go(-1)
0
 

Author Comment

by:nouman2000
ID: 12515549
I am using server side language "JSP"
I am currently using session to store values upon passing information from form. I can edit the form page to take values if session value has been set, I was wondering if there is a client-side alternative.

Just in order to save time perhaps.

All data is validated, and users are let to the next page, but they may change their mind and change values which require them to change their order
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Accepted Solution

by:
VirusMinus earned 375 total points
ID: 12515740
I would use the session variables to refill the data. Safer and faster IMO.
0
 

Author Comment

by:nouman2000
ID: 12516740
Yea, I agree its safer.
Thanks
0
 
LVL 30

Expert Comment

by:VirusMinus
ID: 12516834
Im glad you've found a solution Nouman.

Is there a particular reason for the C grade? A higher grade does not cost you more points.

Please refer to the EE help on grading fairly -> http://www.experts-exchange.com/help.jsp#hi73

=============================================================================
    *  A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.
    * B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.
    * C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.
==============================================================================

One thing you shoud know is that Experts also study your previous grading history and looking at your's,  experts may be hesitant to give you 100% help in future.

You also need to understand that experts here are VOLUNTEERS who try their best to give you solutions on their OWN time. What keeps them going is the knowledge that their solution helped you and the acknowledgement of the quality of their answers (via a relevant grade).

Rest assured, I will try my best to answer your questions in the future but do not be suprised if you get similar feedback from other experts in the future...

If you would like to change the grade please post a 0 point question in Community Support stating the same -> http://www.experts-exchange.com/Community_Support/

Regards
-VM
0
 

Author Comment

by:nouman2000
ID: 12519501
Hey VM,
I dont remember having chosen grade C, I must have been in my sleep. Apologies, however I really dont remember giving a 'C' grade.

How can I change the grade for this question?

Thanks,
Noaman
0
 
LVL 30

Expert Comment

by:VirusMinus
ID: 12520167
No problems Nouman. I have posted a question in Community Support. You can go here and post that you would like the grade changed. An admin or mod will come along and do the needful.

http://www.experts-exchange.com/Community_Support/Q_21197916.html

Cheers
-VM
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question