mozack
asked on
Disabling back
Is there a way to disable back functionality (both the button and right click, back)?
You can't disable back button.
You can disable right mouse click with this script:
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
var ns4 = (document.layers)? true:false
var ie4 = (document.all)? true:false
function press(e) {
if ((ns4 && (e.which == 3 || e.which == 2)) || (ie4 && (event.button == 2 || event.button == 3))) return false
return true
}
for (var i=0; i<document.images.length; i++) document.images[i].onmouse down=press
for (var i=0; i<document.links.length; i++) document.links[i].onmoused own=press
document.onmousedown=press
if (ns4) window.captureEvents(Event .MOUSEDOWN )
window.onmousedown=press
//-->
</script>
</HEAD>
<BODY oncontextmenu="return false">
Anyway you can open the document in a new window without toolbar.
xabi
You can disable right mouse click with this script:
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
var ns4 = (document.layers)? true:false
var ie4 = (document.all)? true:false
function press(e) {
if ((ns4 && (e.which == 3 || e.which == 2)) || (ie4 && (event.button == 2 || event.button == 3))) return false
return true
}
for (var i=0; i<document.images.length; i++) document.images[i].onmouse
for (var i=0; i<document.links.length; i++) document.links[i].onmoused
document.onmousedown=press
if (ns4) window.captureEvents(Event
window.onmousedown=press
//-->
</script>
</HEAD>
<BODY oncontextmenu="return false">
Anyway you can open the document in a new window without toolbar.
xabi
Combined with the other two items above (disabling right-click and the toolbar buttons using JavaScript), you can also change your links to use window.location.replace() functions, which replace the current entry in the browser's history with the URL you specify in the command.
Example:
<a href="javascript:window.lo cation.rep lace('some url.htm')" >thelink</ a>
Example:
<a href="javascript:window.lo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
history.forward() does what I need...
history.forward() does what I need...
You CAN however open a new browser w/ javascript and have it be one w/o the row of navigation buttons.
From there I'd imagine you can disable the right click - again w/ javascript, but you'd have a fun time trying to get it to work on netscape AND IE.
I tried doing this at one point to try and stop people from stealing images.
Jm