Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: setAttribute("onmouseover"...) doesn't work


Message #1 by "Paul Masri" <humanresponder@b...> on Mon, 30 Jul 2001 19:15:44
I've used getAttribute and setAttribute to read and write properties of 
images, such as the width or src and these take effect immediately (tested 
in IE5.5).

Trying the same with an event such as onmouseover *appears* to work, as a 
getAttribute will show the newly set function.  However, the event is not 
captured (again, tested in IE5.5 only so far).

How can I set, remove or change event responses using DOM-style code?  Or 
is there another way that will work in IE5.5 and NN6?

NB: getAttribute("onmouseover") returns a string of the form
function anonymous() { MyFunction() }
where the original HTML had onmouseover="MyFunction()"

Cheers,
Paul.

  Return to Index