Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- switching around images in JavaScript


Fotiman - 3:14 pm on Mar 5, 2012 (gmt 0)


Welcome to WebmasterWorld!


var smallpics0 = "images/small/black_bear.jpg";

smallpics0 is the string "images/small/black_bear.jpg"

smallpics0.onclick=photo0;

The onclick handler of the string "images/small/black_bear.jpg" is photo0?

You need to attach the handler to an element, not to a string.


Thread source:: http://www.webmasterworld.com/javascript/4424840.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com