chester p.
09-04-2004, 01:04 AM
Hi...
I created this simple code to display three images/links that when rolled over, swap to an alternate image, giving the illusion of changing colour. Very simple... It seems to work when tested in IExplorer, but other programs find errors in it such as:
(When the image 'Back' is rolled over)
Line 31: 'Images' is undefined
'back_page' is undefined
'next_page' is undefined
(When the image 'Home' is rolled over)
Line 33: 'Assignment' is undefined
'document.home_page' is null or not a homepage
(When the image 'Next' is rolled over)
Line 35: 'Images' is undefined
'Assignment' is undefined
'document.Next_Page' is null or not a homepage
Below is the code.
Any help would be much appreciated... Thankyou.
<HTML>
<HEAD>
<TITLE> Question_2SMP</TITLE>
<SCRIPT Language="JavaScript">
if(document.imagesSMP)
{
buttonBack= new Image
buttonHome= new Image
buttonNext= new Image
buttonBack.src="Back.gif"
buttonHome.src="Home.gif"
buttonNext.src="Next.gif"
buttonBack2.src="Back2.gif"
buttonHome2.src="Home2.gif"
buttoNext2.src="Next2.gif"
}
</SCRIPT>
</HEAD>
<BODY >
<P align="center">
<A href="back_page.htm" onMouseOver="(back_page.htm)"><img src="Images/Back.gif" alt="Back" name="Image1" width="98" height="23" border="0" onMouseOver="Images/Back2.gif" onMouseOut="document.write=next_page.src=buttonNext.src"></img></A>
<A href="home_page.htm" onMouseOver="(Assignment/home_page.htm)"><img src="Images/Home.gif" alt="Home" name="Image2" width="98" height="23" border="0" onMouseOut="document.home_page.src=buttonHome2.src" a.href="Assignment/home_page.htm"></img></a>
<A href="next_page.htm" onMouseOver="(Assignment/next_page.htm)"><img src="Images/Next.gif" alt="Next" name="Image3" width="98" height="23" border="0" onMouseOver="Images/Next2.gif" onMouseOut="document.Next_Page.src=buttonNext2.src"></img></a>
</P>
</BODY>
</HTML>
I created this simple code to display three images/links that when rolled over, swap to an alternate image, giving the illusion of changing colour. Very simple... It seems to work when tested in IExplorer, but other programs find errors in it such as:
(When the image 'Back' is rolled over)
Line 31: 'Images' is undefined
'back_page' is undefined
'next_page' is undefined
(When the image 'Home' is rolled over)
Line 33: 'Assignment' is undefined
'document.home_page' is null or not a homepage
(When the image 'Next' is rolled over)
Line 35: 'Images' is undefined
'Assignment' is undefined
'document.Next_Page' is null or not a homepage
Below is the code.
Any help would be much appreciated... Thankyou.
<HTML>
<HEAD>
<TITLE> Question_2SMP</TITLE>
<SCRIPT Language="JavaScript">
if(document.imagesSMP)
{
buttonBack= new Image
buttonHome= new Image
buttonNext= new Image
buttonBack.src="Back.gif"
buttonHome.src="Home.gif"
buttonNext.src="Next.gif"
buttonBack2.src="Back2.gif"
buttonHome2.src="Home2.gif"
buttoNext2.src="Next2.gif"
}
</SCRIPT>
</HEAD>
<BODY >
<P align="center">
<A href="back_page.htm" onMouseOver="(back_page.htm)"><img src="Images/Back.gif" alt="Back" name="Image1" width="98" height="23" border="0" onMouseOver="Images/Back2.gif" onMouseOut="document.write=next_page.src=buttonNext.src"></img></A>
<A href="home_page.htm" onMouseOver="(Assignment/home_page.htm)"><img src="Images/Home.gif" alt="Home" name="Image2" width="98" height="23" border="0" onMouseOut="document.home_page.src=buttonHome2.src" a.href="Assignment/home_page.htm"></img></a>
<A href="next_page.htm" onMouseOver="(Assignment/next_page.htm)"><img src="Images/Next.gif" alt="Next" name="Image3" width="98" height="23" border="0" onMouseOver="Images/Next2.gif" onMouseOut="document.Next_Page.src=buttonNext2.src"></img></a>
</P>
</BODY>
</HTML>