Back 2 pages with browser back button?

Results 1 to 3 of 3

Thread: Back 2 pages with browser back button?

  1. #1
    Join Date
    Dec 1969

    Default Back 2 pages with browser back button?

    Hello,<BR><BR>I would like the back button in the browser to go back two pages only on a particular page in my web app. Is there code I can put in the page itself to have the button behave this way? I don&#039t want a link to do a history.back with, I want the browser button itself to do it. Is this even possible?<BR><BR>Thanks,<BR><BR>Dave

  2. #2
    Reggie Guest

    Default Maybe Response.redirect?

    Could you explain the situation a little better? I don&#039t think what you are asking is possible, but there might be an easy work around. For example if someone submits a form and hits the back button, but you want them to go back 2 pages instead of 1 then this code would work.<BR><BR>Put this code at the top of the page that you&#039d want to skip when going back two pages. (enterformdata.asp)<BR>&#060;%<BR>if Request.ServerVariables("HTTP_REFERER")="submitfor mdata.asp" then<BR>response.redirect "mainpage.asp"<BR>end if<BR>%&#062;<BR><BR>Just to clarify the naming, this is what I mean.<BR>mainpage.asp links to enterformdata.asp where you type in the data you want to submit. This is the page to skip when you go back twice. Then when you submit from enterformdata.asp that goes to submitformdata.asp.<BR><BR>Maybe this is the behaviour you are looking for. If not, sorry. Hopefully someone finds it useful.

  3. #3
    Join Date
    Dec 1969

    Default you can't

    you can&#039t mess around with the default buttons. you&#039ll need to live with it and use a self.location.history.go(-2)<BR><BR>j

Posting Permissions

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