Forum Moderators: open

Message Too Old, No Replies

should be a simple changeimage but ...

         

Natko

10:53 pm on May 13, 2004 (gmt 0)

10+ Year Member



hello,
I can't figure out what is wrong whit this script. Can anyone help me please, thanks
-------------------------------------
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}

<a href=javascript:warp()><img src=main.jpg name=targetimage></a>

<a href="#" onClick=changeimage('img_one.jpg',this.href)>img one</a>
<a href="#" onClick=changeimage('img_two.jps',this.href)>img two</a>

Bernard Marx

12:06 am on May 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



change this:
towhat.src
to this:
towhat

..and "quote" ALL your attributes.

Rambo Tribble

2:29 am on May 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When warp() sets the document.location to this.href (passed as url and assigned to gotolink), what is it supposed to do? It would appear the href value that is being passed is #.

Natko

3:12 pm on May 14, 2004 (gmt 0)

10+ Year Member



thankz Bernard ;-)