Received error: function is not defined for js slideshow script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alesia Williams

    Received error: function is not defined for js slideshow script

    Code:
    if (picImages == "049")
    		document.images[0].src = "044.jpg";
    		picImages = "044"
    }
    	else if   {
    		document.images[1].src = "049.jpeg";
    		picImages = "049";
    }
    	else if  {
    		document.images[2].src = "071.jpeg";
    		picImages = "071";
    	}	
    	else if  {
    		document.images[3].src = "895.jpeg";
    		picImages = "895";
    }
    
    /*]]> */
    </script> 
    </head>
     
    <body onload="var changeImages=setInterval('childPics()',2000);">
    <p>img src="044.jpeg" name="images" width="400" height="400" alt= "Toddler gazing" /></p>
    <p>img src="049.jpeg" name="images" width="400" height="400" alt= "Toddler with parent at carnival" /></p>
    Last edited by MMcCarthy; Oct 22 '10, 12:05 AM. Reason: added code tags
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    with the code you posted, nothing hints that the function exists.

    besides, an if statement (lines #5, #9, #13) requires a condition, failing that throws an error which causes the function to not be recognised.

    Comment

    Working...