Skip to content Skip to sidebar Skip to footer

Javascript Placeholders

I am really new to javascript and struggling big with it. The code i have is below. It's easier to explain with more code. So basically want to show each image in each placeholder

Solution 1:

That depends on what you mean by "something from the list". If you just want to check if the src is blank, you can do a direct conditional:

if (document.getElementById('placeholder1').src != '')
    document.getElementById('placeholder2').src = newurl;

Solution 2:

something along the lines of this?

http://jsfiddle.net/UpeFT/1/

bit messy though :P

Post a Comment for "Javascript Placeholders"