allyson
07-07-2002, 03:28 AM
Hi
The following script is supposed to write text as the mouse is rolled over certain images. The text is written on another part of the screen. I wanted it to work in Netscape and Internet Explorer. Unfortunately the script does not work. The script is at http://homepages.ihug.co.nz/~usateden/panacea/entrytest.htm Can anyone help please?
<html>
<head>
<title>Panacea Art</title>
<base href="http://homepages.ihug.co.nz/~usateden/panacea/">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<style type="text/css">
.mouseText {
font: 200 20px "comic sans ms";
color: sienna;
}
.logo {
font-weight: bold;
color: crimson;
}
</style>
<script type="text/javascript" language="javascript">
var MO_text = new Array();
MO_text[1] = 'Find out who is the <span class="logo">Panacea</span> Artist of the
Month';
MO_text[2] ='Come in and see the <span class="logo">Panacea</span> Art Gallery';
MO_text[3] = 'Find out about the <span class="logo">Panacea</span> Arts Trust';
function getCell(id) {
return document.all ? document.all(id) :
document.getElementById ? document.getElementById(id) :
document.layers ? document['NS' + id].document.layers[0] : null;
}
function setCell(id, content, classname) {
var c = getCell(id);
if (!document.layers) {
c.innerHTML = content;
if (classname) c.className = classname;
} else {
var sSPAN = ((classname) ? '<span class="' + classname + '">' : '<span>');
c.document.write(sSPAN + content + '</span>');
c.document.close();
c.parentLayer.clip.width = c.clip.width;
c.parentLayer.clip.height = c.clip.height;
}
}
</script>
<body background="images/bg1.jpg">
<p align="center"><img src="images/titlelogo.GIF" width="220" height="54"></p>
<p> </p>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="227" valign="bottom"><a href="artistofmonth.htm" target="_top"
onmouseover="setCell('textcell',MO_text[1],'mousetext')"
onmouseout="setCell('textcell','')" ;>
<img src="first.GIF" border="0" width="227" height="138"></a></td>
<td width="183" valign="bottom" colspan="2"><a href="#" target="_top"
onmouseover="setCell('textcell',MO_text[2],'mousetext')"
onmouseout="setCell('textcell','')">
<img src="second.GIF" width="183" height="138" border="0"></a></td>
</tr><tr>
<td width="227" valign="top">
<a href="frameset/index.html" target="_top"
onmouseover="setCell('textcell',MO_text[3],'mousetext')"
onmouseout="setCell('textcell','')">
<img src="third.GIF" width="227" height="168" border="0"></a></td>
<td width="180" valign="top"><img src="fourth.GIF" width="180" height="167"></td>
<td id="textcell" width="410" valign="top"><ilayer
id="NStextcell"><layer></layer></ilayer>
</td>
</tr>
</table>
</div>
</body>
</html>
bye
Allyson
The following script is supposed to write text as the mouse is rolled over certain images. The text is written on another part of the screen. I wanted it to work in Netscape and Internet Explorer. Unfortunately the script does not work. The script is at http://homepages.ihug.co.nz/~usateden/panacea/entrytest.htm Can anyone help please?
<html>
<head>
<title>Panacea Art</title>
<base href="http://homepages.ihug.co.nz/~usateden/panacea/">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<style type="text/css">
.mouseText {
font: 200 20px "comic sans ms";
color: sienna;
}
.logo {
font-weight: bold;
color: crimson;
}
</style>
<script type="text/javascript" language="javascript">
var MO_text = new Array();
MO_text[1] = 'Find out who is the <span class="logo">Panacea</span> Artist of the
Month';
MO_text[2] ='Come in and see the <span class="logo">Panacea</span> Art Gallery';
MO_text[3] = 'Find out about the <span class="logo">Panacea</span> Arts Trust';
function getCell(id) {
return document.all ? document.all(id) :
document.getElementById ? document.getElementById(id) :
document.layers ? document['NS' + id].document.layers[0] : null;
}
function setCell(id, content, classname) {
var c = getCell(id);
if (!document.layers) {
c.innerHTML = content;
if (classname) c.className = classname;
} else {
var sSPAN = ((classname) ? '<span class="' + classname + '">' : '<span>');
c.document.write(sSPAN + content + '</span>');
c.document.close();
c.parentLayer.clip.width = c.clip.width;
c.parentLayer.clip.height = c.clip.height;
}
}
</script>
<body background="images/bg1.jpg">
<p align="center"><img src="images/titlelogo.GIF" width="220" height="54"></p>
<p> </p>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="227" valign="bottom"><a href="artistofmonth.htm" target="_top"
onmouseover="setCell('textcell',MO_text[1],'mousetext')"
onmouseout="setCell('textcell','')" ;>
<img src="first.GIF" border="0" width="227" height="138"></a></td>
<td width="183" valign="bottom" colspan="2"><a href="#" target="_top"
onmouseover="setCell('textcell',MO_text[2],'mousetext')"
onmouseout="setCell('textcell','')">
<img src="second.GIF" width="183" height="138" border="0"></a></td>
</tr><tr>
<td width="227" valign="top">
<a href="frameset/index.html" target="_top"
onmouseover="setCell('textcell',MO_text[3],'mousetext')"
onmouseout="setCell('textcell','')">
<img src="third.GIF" width="227" height="168" border="0"></a></td>
<td width="180" valign="top"><img src="fourth.GIF" width="180" height="167"></td>
<td id="textcell" width="410" valign="top"><ilayer
id="NStextcell"><layer></layer></ilayer>
</td>
</tr>
</table>
</div>
</body>
</html>
bye
Allyson