Hi I have the following script in my header:
Then in my image map I call...
When I hover over the area I get an error:
"'document.map' is null or not an object"
The error is pointing to the line:
{document.map.src=path+src;}
What do I have to do to set this?
Any help extremely appreciated.
Code:
<script type="text/javascript">
var path = 'Images/';
var imgObj = new Image();
var imgs = Array('index.jpg','sheet01.jpg');
for(i=0;i<imgs.length;i++)
{imgObj.src=path+imgs[i];}
function swap(src)
{document.map.src=path+src;}
</script>
Then in my image map I call...
Code:
<area shape="rect" coords="27,53,115,123" href="Maps/Far_North_lambert_sheet1.pdf" alt="Sheet 1" title="Sheet 1" onmouseover="swap('sheet01.jpg');" onmouseout="swap('index.jpg');">
When I hover over the area I get an error:
"'document.map' is null or not an object"
The error is pointing to the line:
{document.map.src=path+src;}
What do I have to do to set this?
Any help extremely appreciated.