all groups > dotnet jscript > may 2004 >
You're in the

dotnet jscript

group:

Change the onclick event



Change the onclick event Josée
5/20/2004 10:17:51 AM
dotnet jscript: Hi,
I have an IMG Tag that have an onclick event. On=20
depends on wich pages is load, i would like to change the=20
onclick src.

For exemple, the original code is
<Img src =3D "Something.gif" ID =3D "Test" onclick=20
=3D "window.open('apage.htm','_self');"=20

when another page will be load, i would like that the=20
onclick on my image's set to "window.open
('anotherpage.htm','_self');".

Is it possible ?

I've try to make something like that
Test.onclick =3D "window.open('anotherpage.htm','_self');"
but it doesn't work. Can someone help me ?

Thanks

Re: Change the onclick event Steve Fulton
5/20/2004 2:55:44 PM
[quoted text, click to view]

Test.onclick = function(){window.open('anotherpage.htm','_self');}

--
Steve

One of the advantages of being disorderly is that one is
AddThis Social Bookmark Button