Change the onclick event
Messages   Related Types
This message was discovered on microsoft.public.dotnet.languages.jscript.

Post a new message to this list...

Josée
Hi,
I have an IMG Tag that have an onclick event. On
depends on wich pages is load, i would like to change the
onclick src.

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

when another page will be load, i would like that the
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 = "window.open('anotherpage.htm','_self');"
but it doesn't work. Can someone help me ?

Thanks

Josée
Reply to this message...
 
    
Steve Fulton
Josée wrote:

[Original message clipped]

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

--
Steve

One of the advantages of being disorderly is that one is
constantly making exciting discoveries. -A. A. Milne
Reply to this message...
 
 




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com