Empty FORM fields upon return

Results 1 to 4 of 4

Thread: Empty FORM fields upon return

  1. #1
    3Man Guest

    Default Empty FORM fields upon return

    OK, maybe a question with a simple answer, but...<BR>I have an ASP that POSTs some FORM fields to a second page. If you click Back from the second page, the values entered into the first FORM are now empty. Is it possible to keep the info there for the user if they click back to the FORM SUBMIT page?<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default RE: Empty FORM fields upon return

    I thought it was an interesting question and played around a little. This most definately is not scientific but here is what I found on several of my pages:<BR><BR>1. If I post an asp page to itself or to another asp page the user can click back and the info is still there (I only tested in IE)<BR><BR>2. If i post to a page and then redirect to another page (i.e. user validation where it checks user and then redirects to another page) and click back the info is not there. <BR><BR>I hope this helps<BR><BR>Dennis

  3. #3
    3Man Guest

    Default RE: Empty FORM fields upon return

    I am using IE4, and I still do not see the data that was entered when clicking Back from an ASP that POSTs to itself. I&#039m wondering if it is a server or browser setting, but I can&#039t find anything.

  4. #4
    3Man Guest

    Default Code Sample

    Below is a small ASP.<BR>If I enter my name, click Submit, then click Back, the text box is empty.<BR>BUT, if I enter my name, HIT THE ENTER KEY, the input form is displayed again with a blank text box. THEN, I enter my name, CLICK Submit, then click Back, the text box now has my name.<BR>Any ideas why?<BR>Thanks!<BR>=== formtest.asp ===<BR>&#060;%@ Language=VBScript %&#062;<BR>&#060;HTML&#062;<BR>&#060;BODY&#062;<BR >&#060;%<BR>if Request("submitform")= "" then%&#062;<BR>&#060;FONT size="2" face="Helvetica, Arial"&#062;Enter your name&#060;/FONT&#062;<BR>&#060;form action="formtest.asp" method="POST" id=form1 name=form1&#062;<BR>&#060;input id="txtName" name="txtName" size=30 maxlength=30&#062;<BR>&#060;input id="submitform" name="submitform" type="submit" value="Submit"&#062;<BR>&#060;/form&#062;<BR>&#060;%<BR>else<BR>Response.Write("Y our Name is " + Request.Form("txtName"))<BR>end if<BR>%&#062;<BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<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