PDA

Click to See Complete Forum and Search --> : Possible???


turfbult
Jul 10th, 2001, 06:26 AM
Hello,

I want to change an image which I have on my page everytime a different
select box is clicked!!

IE. I have 2 select boxes. One called "Red" and the other "BLUE".
When the user clicks on "RED" - red.gif is loaded and shown, when the
user clicks on "BLUE" - blue.gif is loaded and shown.

This is just an idea I have - can it be done?? Can it be done without
having to RELOAD the page??

Thanks,
T

sebs
Jul 10th, 2001, 07:32 AM
yes,

<img src="whatever.gif" name="toBeChange">


<input type="button" value="change" onClick="change('red');">


function change(color){
toBeChange.src=color + '.gif';
}

turfbult
Jul 10th, 2001, 03:32 PM
Heck, that was easy!!!!!!!! Thanks sebs.

I REALY(!!!!) do not know what I would have done without YOU guys AND this forum.

Thank you very much all.

T