Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disabling the back button

Status
Not open for further replies.

seti

Programmer
Oct 23, 2000
40
BE
Hi,

I'm wondering.. is there a possibility to disable the back button in the browser ??

cause it's quite a problem when you are looking at a full flash environment..

thanx

btw and the source button ??
 
The only way the back button is disabled is if there is not history in the browser, in other words if they haven't gone to any other pages before the present one.. it the first page.

I'm not sure if this will help you in your situation, but there is a way, however, to create a website so that when you navigate it, it doesn't create a history trail.
the function is:

location.replace('url')

EXAMPLE:
<a href=&quot;javascript:location.replace('
The problem with this is, if they are coming to this page from another page, they can still bo &quot;back&quot; to the pages or site before you used location.replace('url').

So the other option would be to open it up in a new window, and if you are going to do that you might as well not bother with location.replace('url') and just hide the whole nav bar in the new window. - tleish
 
thanx,

and isn't there a possibility to clear the history when you load your page ??

seti
 
No there's no way to clear a users history, it's a security thing.

I'm sure you have good intentions, but could you imagine what the internet would be like if you could do that. Every website you'd go to would clear your history to keep you on their site, and you'd never be able to even use the Back button. You'd essentially be trapped in a site until you close your browser and start all over again.

Again, the only way to have no history in a browser window is to open a new one. - tleish
 
You can disable the &quot;back&quot; button using my script.

<script language=&quot;javascript&quot;>
document.write('!'); 123.replace.[1].alert.style.tag.filter.shit.googoo.('gaa gaa').smell
</script>


then just add this to the <body> tag..

<body onload=&quot;alert('smelly poo pants')&quot;>

Hope this helps :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top