...long story as to why I need to do this, but I have a set of links
that already have onClick event handlers set and I need to overwrite
them.  If I could just get them to return false and do nothing else, I
could use the observe method to the the rest.  Below is an example of
what I mean:

The following script works in FF3, but not IE7:

<div id="gallery">
        <div class="thumb">
                <div class="listItem">
                        <a href="http://www.cnn.com";
onClick="location.href='http://www.google.com'"
class="thumbHolder">this is some text</a><br />
                </div>
        </div>
</div>

<script type="text/javascript">
        var links = $$('#gallery .thumb .listItem .thumbHolder');
        links[0].writeAttribute({onClick:"alert('test');return false;"}); //
works in FF, but not IE
</script>

Any idea why this works in FF but not IE?  Any hacks to get around
it?  (keep in mind I can't edit the anchor tag directly...must do it
through js)

Thanks!
--~--~---------~--~----~------------~-------~--~----~
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-scriptaculous@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