Hidden Form Elements don't go back?

Results 1 to 3 of 3

Thread: Hidden Form Elements don't go back?

  1. #1
    Join Date
    Dec 1969

    Default Hidden Form Elements don't go back?

    I have a hidden form field, the value of which is set using some javascript. The page is submitted to a confirmation page where the user can either click the back button and correct previous entries or go forward to actually submit the form for processing.<BR><BR>I can recover the value of the hidden form on the confirmation page, but when I click the back button, I lose the value. Is there any way to preserve the value when I go back?<BR>

  2. #2
    Conrad Guest

    Default Based on my skill level...

    I would do the following: <BR><BR>1) On the page that the form gets posted to assign the value to a Session variable.<BR><BR>2) On the form page itself create your input field as such:<BR> &#060;INPUT Type="text" Name="foobar" Value="&#060;%= Session("myvalue") %&#062;"&#062;<BR>If there is no value yet the field will be empty.<BR><BR>3) On the page after the confirmation page you need to remove the session variable by doing thus:<BR>Session.Contents.Remove("myvariable")<BR> <BR>I am an intermediate ASP programmer, so there is liketly to be a more effient way to accomplish your goals but it will help you for now.<BR><BR>Cheers!

  3. #3
    Join Date
    Dec 1969

    Default RE: Hidden Form Elements don't go back?

    Huh? I just tested it with MSIE 5.5 browser and the hidden field value survived my hitting the "BACK" button in the browser.<BR><BR>I *do* recall that I ran into this once where NS acted differently. But I don&#039t recall *how* differently.<BR><BR>Are you talking about some kind of "BACK" other than the browser back button?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts