Request.Servervariables("HTTP_REFERER") versus BACK button on browser

Discussion in 'ASP General' started by JJA, Oct 26, 2004.

  1. JJA

    JJA Guest

    When my webserver does not process a user's change because of an
    invalid password, I inform the user and I want to present them a
    button for a retry:

    <TR id=continuebuttonrow>
    <td width="05%">&nbsp;</td>
    <TD width="90%" align=center valign=middle colspan=2>
    <BUTTON TYPE=BUTTON
    ONCLICK="location.href='<% =
    Request.ServerVariables("HTTP_REFERER") %>';"
    class=btnParms name=btnContinue ID="Button3">Try Again (Back)</BUTTON>
    </td>

    Yet if this button is clicked, they go back to the server and the page
    is refreshed with original values.

    If I click the browser's BACK button (rather than my button above), I
    go back to the page (from cache I guess) I want (because it contains
    the user changes). Here I can correct the password without having to
    rekey the changes.

    So, what is the Request.Servervariable needed for the equivalent of
    the BACK button? Thanks.
    JJA, Oct 26, 2004
    #1
    1. Advertising

  2. You would use client-side script only, e.g.

    onclick='window.history.back();'

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "JJA" <> wrote in message
    news:...
    > When my webserver does not process a user's change because of an
    > invalid password, I inform the user and I want to present them a
    > button for a retry:
    >
    > <TR id=continuebuttonrow>
    > <td width="05%">&nbsp;</td>
    > <TD width="90%" align=center valign=middle colspan=2>
    > <BUTTON TYPE=BUTTON
    > ONCLICK="location.href='<% =
    > Request.ServerVariables("HTTP_REFERER") %>';"
    > class=btnParms name=btnContinue ID="Button3">Try Again (Back)</BUTTON>
    > </td>
    >
    > Yet if this button is clicked, they go back to the server and the page
    > is refreshed with original values.
    >
    > If I click the browser's BACK button (rather than my button above), I
    > go back to the page (from cache I guess) I want (because it contains
    > the user changes). Here I can correct the password without having to
    > rekey the changes.
    >
    > So, what is the Request.Servervariable needed for the equivalent of
    > the BACK button? Thanks.
    Aaron [SQL Server MVP], Oct 26, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Elliot M. Rodriguez
    Replies:
    1
    Views:
    627
    bruce barker
    Feb 12, 2004
  2. =?Utf-8?B?cHBhdGVs?=

    Request.ServerVariables ("HTTP_REFERER") using https

    =?Utf-8?B?cHBhdGVs?=, Mar 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,524
    Eric Lawrence [MSFT]
    Mar 3, 2004
  3. Jake
    Replies:
    4
    Views:
    12,257
    Craig Deelsnyder
    Apr 20, 2005
  4. Wayne  Wengert

    Request.ServerVariables("HTTP_REFERER")

    Wayne Wengert, Sep 27, 2003, in forum: ASP General
    Replies:
    3
    Views:
    121
    Wayne Wengert
    Sep 27, 2003
  5. JW
    Replies:
    2
    Views:
    385
    Tony B
    Nov 2, 2003
Loading...

Share This Page