Will,
>My buddy's testing application depends on not using the browser's back
>button. If it's used, the app behaves like a disco dance floor.
>
>What do folks do here to disable the back button?
As many have already stated, disabling the back button is a sure fire way to
confuse the heck out of people. It's one of the top complaints about poorly
designed Flash sites--people expect the back button to take them to the last
page they were on.
While there is no way to "disable" a back button, there is a to load a new
URL so that it overwrites the current history entry--essentially meaning
clicking the back button will take you to the last page you were on before
you got to the site (or if you open the site in a new window, there would be
no back history to go to.)
You could use the following JS function:
function loadUrl(sUrl){
self.location.replace(sUrl);
}
Now on every page, all of your links would need to change from:
<a href="somepage.htm">Link</a>
To:
<a href="javascript:loadUrl('somepage.htm')">Link</a>
The problem w/this technique is handling form posts. You should be able to
post into a hidden <iframe /> though or use an AJAX call to hide the history
entry.
The bottom line is your going to end up doing a lot of work to disable a
feature user's expect to work--and when it doesn't work the way they want,
then they become frustrated.
Of course this point is moot if you have a limited user base that
understands this functionality should not work.
-Dan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255138
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4