|
Your problem is two fold...
Your images are never loading because the variables (number1, number2, ect...) although global are not defined on page load (they are defined when nextroll is called) when the document.write statements write your image tags to the page... Thus, the very first image looking for the variable number1 throws and error and the script quits right there (turn on error reporting so you can find these yourself)...
And, even if the images loaded, there is nothing in your nextroll function to update the image sources... so naturaly the textarea is updated but the images will not be updated even if they were visible on the page....
Suggestion: Place the images in the body of the document using names or ids along with default image sources and place your next roll in the head and change the image and either call the function window.onload or body onload changing the image sources whenever the function fires...
Is this homework? Seems so...
.....Willy
|