469,964 Members | 1,754 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,964 developers. It's quick & easy.

Received error: function is not defined for js slideshow script

Expand|Select|Wrap|Line Numbers
  1. if (picImages == "049")
  2.         document.images[0].src = "044.jpg";
  3.         picImages = "044"
  4. }
  5.     else if   {
  6.         document.images[1].src = "049.jpeg";
  7.         picImages = "049";
  8. }
  9.     else if  {
  10.         document.images[2].src = "071.jpeg";
  11.         picImages = "071";
  12.     }    
  13.     else if  {
  14.         document.images[3].src = "895.jpeg";
  15.         picImages = "895";
  16. }
  17.  
  18. /*]]> */
  19. </script> 
  20. </head>
  21.  
  22. <body onload="var changeImages=setInterval('childPics()',2000);">
  23. <p>img src="044.jpeg" name="images" width="400" height="400" alt= "Toddler gazing" /></p>
  24. <p>img src="049.jpeg" name="images" width="400" height="400" alt= "Toddler with parent at carnival" /></p>
Oct 21 '10 #1
1 1251
Dormilich
8,652 Expert Mod 8TB
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.
Oct 22 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.