ok...another simple question....Please?

Results 1 to 5 of 5

Thread: ok...another simple question....Please?

  1. #1
    Raquel Anne Guest

    Default ok...another simple question....Please?

    I want to create a way so that when a visitor visits a page, the user cant use the back button to reaccess the .asp page.<BR><BR>for example:<BR>you go to visit page1.asp<BR>there is a button that takes you topage2.asp<BR>well, once there, you are not able to go to page1.asp unless you start from the begining.<BR><BR>I thought about win.open(new) but under the conditions I need for the second page, that is not an option....any ideas or code that really works?<BR>any help would be, again greatly appreciated!<BR>Thanks,<BR>Raquel Anne

  2. #2
    Jason Miller Guest

    Default RE: ok...another simple question....Please?

    Unusual situation, but here&#039s what I&#039d do (while I look for the way to stick form data in a header manually):<BR><BR>put a name and value on the submit button with the action pointing to a single asp page (itself) which will display page 1 through whatever, depending on what value the submit button gave it. Pressing "back" should result in a "Page Expired, Reload?" dialog which will leave the user either at their current page or with a big old "Can&#039t Display" message.<BR><BR> if request.form("submitted") = 1 then %&#062;<BR>&#060;form action="thispage.asp" method=post&#062;<BR>&#060;input type=submit name="submitted" value="2"&#062;<BR>&#060;/form&#062;<BR>&#060;% elseif request.form("submitted") = 2 then %&#062;<BR>&#060;form action="thispage.asp" method=post&#062;<BR>&#060;input type=submit name="submitted" value="3"&#062;<BR>&#060;/form&#062;<BR>&#060;% elseif request.form("submitted") = 3 then %&#062;<BR>&#060;form action="thispage.asp" method=post&#062;<BR>&#060;input type=submit name="submitted" value="1"&#062;<BR>&#060;/form&#062;<BR>&#060;% end if %&#062;<BR><BR>Hope that helps,<BR>Jason

  3. #3
    Raquel Anne Guest

    Default HUH? you lost me

    I mean real lost...could you explain in more detail please?<BR>Raquel Anne

  4. #4
    Jason Miller Guest

    Default Storing multiple pages in one script (take 2)

    Instead of having page1.asp and page2.asp, you just have page.asp and if the submit button was pressed (ie: <BR>&#060;% if request.form("name_of_submit_button")= "value_of_submit_button" then %&#062;<BR>) you run the page2.asp routine, otherwise you run the page1.asp routine.<BR><BR>What the included code was demonstrating was a tree which (if I did it right), would take a user who had seen "page 1" to "page 2", from 2 to 3 and from 3 to 1. The catch is that they&#039re all in the same file (asp script), so telling the browser to go Back wouldn&#039t do a thing. Of course, they could just close the browser and open the page again... But there&#039s some things you can&#039t protect against.


  5. #5
    Raquel Anne Guest

    Default ureka! I understand now....thanks!

    thank you very much, Now I see the light.... 8o)

Posting Permissions

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