...

View Full Version : dynamic change of an event handler does not work



hbnetworker
06-24-2004, 12:45 PM
Hi,

this is my first post here!

I am trying for IE6 from a iframe to change the attribute onClick from a button at an onload event with
either

parent.document.getElementById("pbsave").setAttribute("onClick", "function () {alert('test');actionSubmit('save2')}")
or
parent.document.getElementById("pbsave").onClick = function () {alert('test');actionSubmit('save2')};

but it keeps on with the old value "save1" for onClick!

How can i do it ?

Thanks,

Hans Braumüller
Networking Artist
http://braumueller.crosses.net

adios
06-24-2004, 07:19 PM
onclick



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum