Font style anomaly
Hi,
I have some HTML which calls a Javascript function on mouse over (both pasted below). The function showPic shows a picture stipulated by the href code which is used as the ‘placeholder’ parameter in the function. Some accompanying text stipulated by the title code is used as the ‘desc’ parameter. ‘placeholder’ and ‘desc’ are the IDs of two separate cells of a table where the picture and text are displayed. Everything works fine except when I try and change the font of the table to something other than default, the ‘desc’ text doesn’t show. Is there a way to stipulate the font style without this happening?
Don
HTML:
<img
src="pics/aliceinwonderland/flamingo.gif"
onmouseover=" return showPic(this) "
href="pics/aliceinwonderland/flamingo-head.gif"
title="pic details"
width="50"
height="65"
>
javascript:
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').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;
}
}
|