I have an application running on a frames page and I want to control the navigation logic myself i.e I want to disable the pages Back and Fowards button.
Is there an onload command I can use.
As is using frames... alright, misusing frames. Few people use them correctly. A NOFRAMES tag shouldn't be optional, and the page should be navigatable without frames (w/o losing (much of) the content).
Text only browsers are in a lot of handheld devices and as bluetooth and WIFI technologies become more common place there will be a lot more simple tools that have web browsers in them (Toasters that you can check your e-mail from, fridges that maintain a webserver so you can check your fridge before leaving work to see if you need to stop at the store). make sure that you can veiw your site in lynx and/or links before calling it "done."
Besides, there is also a large body ofpeople who just hate frames, why lose visitors?
That being said, there probably is a way to clear back button's history -- but I wouldn't know what it is or reccomend it.
OK..to avoid the death penalty I will re-assess my villainous intent to disable the back button. Frames..sorry , I'm to far down the path to ruin on this particular site. Layers next time?
The reason I need this is because I am coding a footy tipping website where a logical body of work finishes with a thankyou page etc. From this page, I want the user to be forced to return to the main page so the next user can logon. If I allow them to page back, another user could just re-enter the previous person's tips. So clearing the back buttons history would be perfect.
I guess in essence, I need to user to enter and exit a secure transaction.
If you use PHP, you can simply store it in sessions and on the tip_start.php, you kill the session, if it already is set.
on tip_send.php, you can send the tip..
eg. if they "step back", it will kill all session data and then reset the form.
I guess you can do the same in ASP. I havent coded in ASP for ages.
Thanks for your time on this all of you.
I am using ASP as the backend and have found a host of information on the net...which is where I should have started.
It appears that of all questions asked re APS, this question ranks as the highest frequency.
Will post the code when I get it working.
Thanks again
cflava: I think your destroying your own argument here, as you first say it's ok to have javascript do some hokus-pokus, then later, you say it's ok that the user does not have javascript, as long as the user does not know that he is missing out on something.
eg. there must be a plan-b, if you run on plan-a.
No hokus pokus for me, I'll rather let my users click some "dumb" link or button, or even close the window on theire own.
If they are 1337 enough to visit my pages, they should be able to close a window.
i bow down to you. i am not destroying anything. i simply raised a question "why don't you have js do it?" it was a question.
i don't even know how the conversation got to this point. i agree 110% with clearing all session variables and returning to the login page. that's what i do all the time with php.
I ended up controlling the paging back thru session variables and the insertion of a dummy holding page between the data entry/confirm page and the committ page.
The dummy page just held the data from the entry page in a form and submitted onload. The onload command executes after the form is populated from the previous page.
If the user tries to page back from the committ/thankyou page, the dummy page just submits again with an action of the committ page. Then , on the committ page, I have the session variable logic setup i.e if we've been here before, then redirect to logon page...where I kill the session first up.
Works perfectly...once again, probably sending shudders through those who actualy know how to code this stuff, but from my reading on the net, no meta tag or ASP Request.Object solution is fool proof. Great discussion on it here...
What about clearing all sesson variables/cookies when the thank you page loads? Then, if you check for being logged in on other pages, any submission without a current login could automatically redirect to the login page. The thank you page would be the page that writes the data to the server, and if the session variable is missing, then would redirect without resubmitting.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.