If I dynamically create an achor in IE6 and IE7, it's onclick event
won't fire when clicked on.  Below is an example of a static anchor
and dynamic anchor - both are supposed to pop up an alert.  Why does
only the static anchor work?

++++++++++++++++++++++++++++
JS JS JS JS JS JS JS JS JS JS JS JS
++++++++++++++++++++++++++++

$('dynamicLink').appendChild(
    new Element(
        'a', {
            href: '#',
            onclick: "alert('this link works')"
        }
    ).update('dynamic power button')
);

++++++++++++++++++++++++++++
HTML HTML HTML HTML HTML HTML
++++++++++++++++++++++++++++

<a
    href="#"
    onclick="alert('this link works')">
    static power link
</a>

<div id="dynamicLink"></div>

--

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.


Reply via email to