back to referring page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Brearley

    back to referring page

    I was wondering if there was an easy way to have a form set up so that when
    the submit button is pressed, it goes to a confirmation page that contains a
    back button that goes back to the page that called the form.

    Basically, I'm looking at a scenario where 10 pages can call the form, but I
    want to user to be able to click the back button and be returned to the page
    they were on when they click on the link to the form.

    I thought that maybe using javascript:hist ory.go(-2) would work, but if the
    form is reloaded for any reason, gaing back 2 pages goes back to the form.

    --
    Posted 'as is'. If there are any spelling and/or grammar mistakes, they
    were a direct result of my fingers and brain not being synchronized or my
    lack of caffeine.

    Mike Brearley


  • Aaron Bertrand - MVP

    #2
    Re: back to referring page

    Why not make the referring URL part of the form data.

    <form name=a onsubmit='docum ent.a.referer.v alue=document.l ocation.href';>
    <input type=hidden name=referer>
    ....

    Then on the next page,

    <input type=button onclick='locati on.href="<%=req uest.form("refe rer")%>";'>

    --
    Aaron Bertrand
    SQL Server MVP
    Please contact this domain's administrator as their DNS Made Easy services have expired.





    "Mike Brearley" <mike_brearleyD ONTDOIT@NOSPAMh otmail.com> wrote in message
    news:eGqhvwdOEH A.2336@TK2MSFTN GP09.phx.gbl...[color=blue]
    > I was wondering if there was an easy way to have a form set up so that[/color]
    when[color=blue]
    > the submit button is pressed, it goes to a confirmation page that contains[/color]
    a[color=blue]
    > back button that goes back to the page that called the form.
    >
    > Basically, I'm looking at a scenario where 10 pages can call the form, but[/color]
    I[color=blue]
    > want to user to be able to click the back button and be returned to the[/color]
    page[color=blue]
    > they were on when they click on the link to the form.
    >
    > I thought that maybe using javascript:hist ory.go(-2) would work, but if[/color]
    the[color=blue]
    > form is reloaded for any reason, gaing back 2 pages goes back to the form.
    >
    > --
    > Posted 'as is'. If there are any spelling and/or grammar mistakes, they
    > were a direct result of my fingers and brain not being synchronized or my
    > lack of caffeine.
    >
    > Mike Brearley
    >
    >[/color]


    Comment

    • Mike Brearley

      #3
      Re: back to referring page

      what about calling the form page with something like
      'form.asp?refer er=thispage.htm ' Question is, how do I find out what referer
      is and use it or what's the correct way of doing this?

      --
      Posted 'as is'. If there are any spelling and/or grammar mistakes, they
      were a direct result of my fingers and brain not being synchronized or my
      lack of caffeine.

      Mike Brearley

      "Aaron Bertrand - MVP" <aaron@TRASHasp faq.com> wrote in message
      news:u5OBfzdOEH A.3712@TK2MSFTN GP10.phx.gbl...[color=blue]
      > Why not make the referring URL part of the form data.
      >
      > <form name=a onsubmit='docum ent.a.referer.v alue=document.l ocation.href';>
      > <input type=hidden name=referer>
      > ...
      >
      > Then on the next page,
      >
      > <input type=button[/color]
      onclick='locati on.href="<%=req uest.form("refe rer")%>";'>[color=blue]
      >
      > --
      > Aaron Bertrand
      > SQL Server MVP
      > http://www.aspfaq.com/
      >
      >
      >
      >
      > "Mike Brearley" <mike_brearleyD ONTDOIT@NOSPAMh otmail.com> wrote in message
      > news:eGqhvwdOEH A.2336@TK2MSFTN GP09.phx.gbl...[color=green]
      > > I was wondering if there was an easy way to have a form set up so that[/color]
      > when[color=green]
      > > the submit button is pressed, it goes to a confirmation page that[/color][/color]
      contains[color=blue]
      > a[color=green]
      > > back button that goes back to the page that called the form.
      > >
      > > Basically, I'm looking at a scenario where 10 pages can call the form,[/color][/color]
      but[color=blue]
      > I[color=green]
      > > want to user to be able to click the back button and be returned to the[/color]
      > page[color=green]
      > > they were on when they click on the link to the form.
      > >
      > > I thought that maybe using javascript:hist ory.go(-2) would work, but if[/color]
      > the[color=green]
      > > form is reloaded for any reason, gaing back 2 pages goes back to the[/color][/color]
      form.[color=blue][color=green]
      > >
      > > --
      > > Posted 'as is'. If there are any spelling and/or grammar mistakes, they
      > > were a direct result of my fingers and brain not being synchronized or[/color][/color]
      my[color=blue][color=green]
      > > lack of caffeine.
      > >
      > > Mike Brearley
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...