Look, here’s what I’m trying to do:
From a hyperlink in the document, and within the onclick attribute of that hyperlink, I’ve tried to loop through all the hyperlinks in the document and then assigning event handler properties to each link from the current hyperlink’s onclick attribute. Hope you got it, in case here’s what it looks like, and note that it doesn’t work, in fact event handler properties don’t seem to work no matter how I try them wether it’s via a function call, or just inline code nothing ever happens. This example didn’t generate any script errors:
[COLOR=red]
<a href=”#” onclick=’for(i=0;i<document.links.length;i++)document.links[i].onclick=”alert(100/45)”‘>link</a>
Note that the code doesn’t break in the middle in the original code like it does here. Summary: JavaScript event handler properties won’t work. I’m using Firefox 1.0, and no errors are generated from this example. thanks.