CloudF7
08-17-2002, 06:03 AM
Hello,
Im using two different script on the same page, one is a no right click javascript and one is a status bar script that just makes it blank
No Right Click Script-
<script language=JavaScript>
function clickIE() {
if (document.all) {
return false;
}
}
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
}
else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
</script>
Status Bar Script -
<script>
function hidestatus(){
window.status=''
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>
Well i tested the page and after about 2 mins i found a bug about how if i right clicked my links with my mouse it shows the link which makes having the script in place useless, is there a conflict between these two scripts? and is there a way to fix it so when i right click on the link on my page that it wont display the link?
Any help would be appreciated, im not good at programming java/javascript since im a noob at it and i just started to try to learn it about 4 days ago.
Sorry about posting the whole script of each but i thought it might help :(
Thank you,
Cloud
Im using two different script on the same page, one is a no right click javascript and one is a status bar script that just makes it blank
No Right Click Script-
<script language=JavaScript>
function clickIE() {
if (document.all) {
return false;
}
}
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
}
else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
</script>
Status Bar Script -
<script>
function hidestatus(){
window.status=''
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>
Well i tested the page and after about 2 mins i found a bug about how if i right clicked my links with my mouse it shows the link which makes having the script in place useless, is there a conflict between these two scripts? and is there a way to fix it so when i right click on the link on my page that it wont display the link?
Any help would be appreciated, im not good at programming java/javascript since im a noob at it and i just started to try to learn it about 4 days ago.
Sorry about posting the whole script of each but i thought it might help :(
Thank you,
Cloud