[thelist] Preventing default behaviour and event listener

J.J.SOLARI jjsolari at pobox.com
Mon Jun 6 14:42:50 CDT 2005


Hello,

A question about event listeners and elements default behaviour.

I have an event listener associated to a link <a>. It's a click
event which triggers a function creating a smaller informative popup
window.

The intended behaviour is for the window containing the link to stay
as-is so that one just needs to close the popup window and resume
browsing on this parent window when finished with the popup.

There is a simple solution which is to have a 'onclick="return
false;"' hardcoded into the link.

But how can it be done without resolving to this solution?

W3C DOM function preventDefault doesn't seem to be implemented yet
(at least with Firefox, Safari, Camino). 

TIA,

JJS


More information about the thelist mailing list