Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: how to retain the state of a page?


Message #1 by "sylvia" <sylvia_love@y...> on Mon, 13 Nov 2000 06:22:33 -0000
This might not be the most effective way, but why not write all info into
Cookie and read / populate
back when the original page is loaded. I prev did it this way and worked
wonderfull

-----Original Message-----
From: Michael A. Michalski [mailto:mmcihalski@n...]
Sent: Monday, November 13, 2000 2:24 PM
To: javascript
Subject: [javascript] Re: how to retain the state of a page?


Use hidden form fields to store your information passed from the first form.

Instead of using history.back() to go back to the first form (I am making an
assumption here), use a form.submit but change the action associated with
the form to the first page.  Something like this should do the trick.

function goBack(form) {
    form.action = "firstpage.asp";
    form.submit();
}

Michael

----- Original Message -----
From: "sylvia" <sylvia_love@y...>
To: "javascript" <javascript@p...>
Sent: Monday, November 13, 2000 1:22 AM
Subject: [javascript] how to retain the state of a page?


> the problem goes....
> the information from the first page is passed to the second ASP page. the
> second ASP page (initially blank) will retrieve data from the database and
> display it on this form. the user need to fill in the second form again.
> If the user enter wrong information, the error message is prompted and the
> user need to reenter the information. however, whenever the error message
> is prompted and the go back to the form, the information is gone. a blank
> page will be displayed. how to retain the information pass from the first
> page in the second page?....hopefully, you could understand...please help
>


  Return to Index