[thelist] JavaScript: the Back Button
Tab Alleman
Tab.Alleman at realmetros.com
Mon May 13 15:11:01 CDT 2002
Ahhhh, normally I'd agree, but the purpose the invisible script (which I
haven't mentioned previously) makes this solution unworkable AFAICS.
The Invisible (page 2) script lives on a separate server (and domain)
from Page 3. The purpose of Page 2 is to send a handshake to the Page 3
server. If the server is up, it sends the user to Page 3. If the
server is down, it sends the user somewhere else. So I can't combine
pages 2 & 3 without defeating the purpose of page 2.
And now for a progress report. I've put this in my ASP:
<pseudocode>
IF Request.ServerVariables("HTTP_REFERER") = Page3URL THEN
Response.Write("<html><body
onload=history.go(-3);></body></html>")
Response.End
ELSE
Response.Write(Request.ServerVariables("HTTP_REFERER") & "<br>"
& GetDatesURL)
END IF
</pseudocode>
And I'm finding that when Page2 used Response.Redirect() to send the
user to page 3, this worked perfectly. But when I switched to <body
onload="form.submit();">, the HTTP_REFERER still contains Page1, and not
Page3 and the condition isn't met. So I suspect some caching weirdness
which I will try to sort out next.
-----Original Message-----
you're trying to solve the wrong problem.
in your processing page for the first form, you need some base logic
like
this:
' process contents of form
<% asp blah %>
' do we have additional data to process?
If foo = "bar" Then
' do the additional processing in the same script
<% do more asp blah %>
End If
More information about the thelist
mailing list