-
Combining DD Scripts causes error, please help
Hi im trying to use two DD scripts on my site, the Disable select-text script and Bookmark site script
http://www.dynamicdrive.com/dynamicindex9/noselect.htm
http://www.dynamicdrive.com/dynamicindex9/addbook.htm
I've added them to a .js file as it is, but I get an error, heres the code in my js file
---- start script -------------
/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
// JavaScript Document
/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
------- End Script ----------
Im a complete idiot when it come to even the basics of scripting, can anyone tell me what im doing wrong here. Do I need to open or close something? Can these scripts function together?
the bookmark script seems to work, the select text doesn't work at all.
-
-
Ok I've resolved it, just a bad URL
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks