Solved

Retain data on the form when the page is backed in Netscape 4.7

Posted on 2001-06-15
10
148 Views
Last Modified: 2010-04-09
I have developed an HTML page. This page is designed with a form to feed data in different fields like name, address etc. On this page I have provided a button to view another page with some additional information. After filling this form, I click on this button to view that another page. After viewing this another page, I click on back button to go back to the page where I have entered data in the form. The form page opens but the data fed by me earlier are lost. How do I retain the data entered in the form when I back to this page? This problem occurs in Netscape 4.7. In IE 5 it works fine. Please suggest a solution for this.
0
Comment
Question by:jyotiweb
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 22

Expert Comment

by:CJ_S
Comment Utility
You can never be sure whether the data will stay or not. Best thing to do is to open the information page in a popup window. Another way is to store all values in cookies and when needed retrieve them again.

Regards,
CJ
0
 
LVL 10

Expert Comment

by:dij8
Comment Utility
There are a few options.  It is all a matter of how much work you want to put into the development.

The easiest solution is to open a new window with the additional information.  Making sure there is a "Close window" button.  But this may not work with your design.

Another solution is to use frames.  The second frame (set really small so it can't be seen by the user) with hidden form fields.  Either have any link run a script to fill in these fileds from the entries already made or enter them automatically "onchange".  The page would then fill in the fields onload from the hidden fileds in the "hidden" frame.

Alternatively, the same deal as the frames option except use cookies instead.  Create cookies when the fields are changed or a link is clicked.  And fill the fields using an onload statement.  If the cookies don't exist the values will be "".
0
 
LVL 10

Expert Comment

by:dij8
Comment Utility
Took me too long to type CJ. ;-)
0
 
LVL 22

Expert Comment

by:CJ_S
Comment Utility
*smiles* :-)
0
 
LVL 8

Expert Comment

by:edemcs
Comment Utility
if you use a server side language such as Coldfusion or ASP, you can load the form data into an Array of Structs.  These structs can keep track of all of your data on the webpage.  Everytime you go to that page, load it with the information in the struct, this will populate data if it was added, or leave the boxes blank.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 1

Accepted Solution

by:
GreyWolf_tx earned 50 total points
Comment Utility
Cookies will work but there are two drawbacks to them, one is that they use up server memory and the second is that security conscience users may have cookies disabled. Structs and arrays also work but are a lot of work to maintain.

There's a cross-browser compatible solution that doesn't involve setting cookies or opening another window but it does involve a little HTML work. You can create a hidden form which stores the values your users have entered and is passed from page to page and is accessible via your favorite scripting language (JavaScript, VBScript, PHP, etc.).

Any of the previously mentioned solutions will work but as dij8 said, it all depends on how much work you want to put into it.

GreyWolf
0
 
LVL 10

Expert Comment

by:dij8
Comment Utility
Why was GreyWolf given the points when it was just a repost of what I said anyway?

I am glad I didn't get my suggestion accepted if the best you can give is a B.  Especially considering the question was answered and no request for more information was given.  I suggest you read the tips on questions and answers (http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3).

You are new here so that always gets a little grace.  Welcome to EE of course and I hope you stick around to ask more questions.  Please watch what others are doing and be keen to show high respect to the experts that deserve it.
0
 

Author Comment

by:jyotiweb
Comment Utility
I am extremly sorry for that. I appreciate your effort to answer my question. In future I will take care. Thanks for the solution and suggestions.
0
 

Author Comment

by:jyotiweb
Comment Utility
I am extremly sorry for that. I appreciate your effort to answer my question. In future I will take care. Thanks for the solution and suggestions.
0
 
LVL 8

Expert Comment

by:bebonham
Comment Utility
yeah...and he said that cookies take up server memory???

does he know what a cookie is?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
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)

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now