View Single Post
  #5 (permalink)  
Old October 27th, 2011, 05:33 PM
jmcpeak's Avatar
jmcpeak jmcpeak is offline
Wrox Author
Points: 361, Level: 6
Points: 361, Level: 6 Points: 361, Level: 6 Points: 361, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2005
Location: , Texas, USA.
Posts: 77
Thanks: 0
Thanked 12 Times in 12 Posts
Default

Howdy, Robert. I apologize for missing your earlier reply.

One thing to remember about the path is it's not JavaScript, but the browser. You're changing an <img/> element's src attribute. So it's not a JavaScript problem, but a path problem.

From looking at your original code, the <img/> elements were looking for the images in the base path "../../images/chapter.06/". But in the JavaScript, the base path was "../../images/". Notice the path in the JavaScript omitted the "chapter.06" directory. Add that directory to the path, and you should get the results you desire.
Reply With Quote