Forum Moderators: phranque
Basically, when the user highlights an image for a bunch of JS code I have written, it messes the script's look up.
function DisableTextSelection()
{
//Prevent selecting text in IE
document.onselectstart = new function(){return "false"};
//Prevent selecting text in FF
if (window.sidebar)
{
document.onmousedown = DisableText;
document.onclick = EnableText;
}
}
function DisableText(e)
{
return false;
}
function EnableText()
{
return true;
}
Now, whenever you want to disable text selection, just call DisableTextSelection();.