Forum Moderators: open

Message Too Old, No Replies

Help disabling 'alt' and 'title' text bubbles in browser...?

         

DarthNunzio

1:52 pm on Jul 18, 2005 (gmt 0)



Hi all,

I'm using a small javascript to display an image and associated text on mouseover. the script works great, with one problem: the text is given in the "title" tag of the link, which means it pops up in that little browser "bubble" when i hover over the image for a few seconds. this needs to stop. Is there a way to disable it?

SCRIPT
---------------

<script type="text/javascript" language="javascript">
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('main_thumb').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}
}
</script>

SAMPLE LINK
----------------

<a onmouseover="return showPic(this)" href="image_link" title="this is the annoying text that shows up"><img src="image"></a>

adni18

4:56 pm on Jul 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Simple: remove the title tag and the funtion that sets the title...