PDA

View Full Version : Script Conflicts


bear
08-05-2003, 12:34 AM
Hi all-

I just read the tutorial on conflicting scripts, but the problem is Im using 3 scripts/styles in the HEAD of the page, and there is no body onload handler. I placed a script in and now the entire document doesnt work correctly. It's Scrollable content script II- © Dynamic Drive. It worked fine till I entered the last script, now it wont work correctly.

These are the 3 I have in the HEAD - I would be enormously grateful and downright giddy if anyone can tell me where the conflict is and what I can do to correct it. Let me know if you need the actual scrollable content script. Thanks
-----

<script>

//Hide status bar msg II script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use

function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>
<style>
<!--
/*
Text Link Underline Remover Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
a{text-decoration:none}
//-->
</style>
<script language=JavaScript>
<!--
/*
Disable right mouse click Script (By Crash @ http://walk.to/crash)
Submitted to and permission granted to Dynamicdrive.com to feature script in it's archive
For full source code to this script and 100's more, visit
http://dynamicdrive.com
*/
var message="Copyright 2003";
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->
</script>
</head>

--------

Vincent Puglia
08-05-2003, 02:02 AM
Hi,

Throw out the disable right click script and then reread the instructions for having multiple scripts on a page. The disable right click script doesn't stop anyone but 5 years olds from looking at your code.

In fact, dynamic drive and anyone else who has a similar script is doing javascript and coding in general a dis-service by posting the script without informing the potential user that it is useless.

I won't comment on the other 2 scripts since you actually might have a legitimate reason for using them.

Vinny