Stupid question -- but those are the easiest to answer, I guess.
All answers I've found are all too sophisticated.
This excerpt works but is not XHTML strict compliant because of illegal use of "name"
This doesn't work using what examples I can find.Code:function animator() { document.animimage.src = anims[frame].src; <-- this is the offending javascript but it works frame = (frame + 1); if(frame >= 7) { frame = 0; } timeout_state = setTimeout("animator()", 2200); } ... </head> <body> ... <div id="rotator"> <img src="images/stress0.jpg" name="animimage" alt="stressed lady" height="168" width="125" /> <-- name is illegal </div>
I also triedCode:function animator() { document.getElementById("animimage").innerHTML = anims[frame].src; <-- what do I use instead frame = (frame + 1); if(frame >= 7) { frame = 0; } timeout_state = setTimeout("animator()", 2200); } ... </head> <body> ... <div id="rotator"> <img src="images/stress0.jpg" id="animimage" alt="stressed lady" height="168" width="125" /> <-- id is legal </div>to no availCode:document.getElementById("animimage").value = anims[frame].src;



Reply With Quote


Bookmarks