View Single Post
Old 09-08-2002, 03:01 PM   PM User | #4
Rok
New Coder

 
Join Date: Sep 2002
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rok is an unknown quantity at this point
Yes I know about that but what I wanted to do is to dynamically set an additional event handler, which you can not do using javascript event handler properties.

Cause if you have
<img id="slika" onclick="alert('a');">
and then javascript:
document.getElementById('slika').onclick = function() {alert('b')}
and then click on the image, you would get only alert('b') but not both.

I know the solution now. Using addEventHandler or attachEvent (IE) you can accomplish this.
Rok is offline   Reply With Quote