Mouseover Errors - Document has no properties

S

SarahLoukota

I need help!

It's been awhile since I've worked with Javascript, and I am updating
a clients site - that I did not build. (www.pain-docs.com) The site
uses a .js include, for the mouseovers. There is an error on every
single page!

I'll pay someone $20 via paypal for your time if you come up with the
magic answer today (August 6th, 2003).

Here is the code in the .js file.
*********************************************************

<!--
if (document.images) {
image1on = new Image();
image1on.src = "/images/nav_about2.gif";

image2on = new Image();
image2on.src = "/images/nav_staff2.gif";

image3on = new Image();
image3on.src = "/images/nav_topics2.gif";

image4on = new Image();
image4on.src = "/images/nav_contact2.gif";

image5on = new Image();
image5on.src = "/images/nav_request2.gif";

image6on = new Image();
image6on.src = "/images/nav_events2.gif";

image1off = new Image();
image1off.src = "/images/nav_about1.gif";

image2off = new Image();
image2off.src = "/images/nav_staff1.gif";

image3off = new Image();
image3off.src = "/images/nav_topics1.gif";

image4off = new Image();
image4off.src = "/images/nav_contact1.gif";

image5off = new Image();
image5off.src = "/images/nav_request1.gif";

image6off = new Image();
image6off.src = "/images/nav_events1.gif";

}

function changeImages() {
if (document.images) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments].src =
eval(changeImages.arguments[i+1] + ".src");
}
}
}
// -->

Here is the code in the actual HTML files
*******************************************************

<table width="756" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td width="102"><a href="/about/" onMouseOver="changeImages('image1',
'image1on')" onMouseOut="changeImages('image1', 'image1off')"><img
border="0" src="/images/nav_about2.gif" width="102"
height="20"></a></td>
<td width="79"><a href="/staff/" onMouseOver="changeImages('image2',
'image2on')" onMouseOut="changeImages('image2', 'image2off')"><img
border="0" src="/images/nav_staff1.gif" width="79" height="20"
name="image2"></a></td>
<td width="146"><a href="/topics/index.html"
onMouseOver="changeImages('image3', 'image3on')"
onMouseOut="changeImages('image3', 'image3off')"><img border="0"
src="/images/nav_topics1.gif" width="146" height="20"
name="image3"></a></td>
<td width="80"><a href="/contact/" onMouseOver="changeImages('image4',
'image4on')" onMouseOut="changeImages('image4', 'image4off')"><img
border="0" src="/images/nav_contact1.gif" width="80" height="20"
name="image4"></a></td>
<td background="/images/nav_background.gif" align="right"><a
href="https://secure.contactdesigns.net/pain-docs.com/htdocs/contact/request.html"
onMouseOver="changeImages('image5', 'image5on')"
onMouseOut="changeImages('image5', 'image5off')"><img border="0"
src="/images/nav_request1.gif" width="155" height="20"
name="image5"></a></td>
<td width="4"><img src="/images/nav_shadow.gif" width="4"
height="20"></td>
</tr>
</table>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,573
Members
47,205
Latest member
ElwoodDurh

Latest Threads

Top