doramail05
asked on
Object Required on MoveNext()
the js will display 3 picture with slideshow with moveprevious and movenexr
encountered 'Object Required' error on MoveNext();
encountered 'Object Required' error on MoveNext();
<HTML>
<HEAD>
<TITLE>Slideshow Sample</TITLE>
<SCRIPT LANGUAGE="JAVASCRIPT" >
PicArray = new Array("images/01.jpg","images/02.jpg","images/03.jpg")
CurrentPic = 0
ImageCount = PicArray.length - 1
function MovePrevious()
{
if (document.images && CurrentPic > 0)
{
CurrentPic--
document.myPicture.src=PicArray[CurrentPic]
}
}
function MoveNext()
{
if (document.images && CurrentPic < ImageCount )
{
CurrentPic++
document.myPicture.src=PicArray[CurrentPic]
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="WHITE">
<CENTER>
<H1>My Slide Show</H1>
<IMG SRC="images/01.jpg" NAME="myPicture" ALT="My First Slideshow">
<BR>
<A HREF="javascript:MovePrevious();"><< Move Previous</A>
<A HREF="javascript:MoveNext();">Move Next >></A>
</CENTER>
</BODY>
</HTML>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.