views:

240

answers:

1
$("#listView object.modal").click(function(){
        // Get the ID of the clicked link:
        var link = $(this).closest("h2").attr("title");
        var id = $(this).closest("div").attr("id");
        showDialog(link, id);

        return false;
    });

This fires a modal (jQuery UI). It it working in FF, Chrome/Safari but not in IE 7/8. Is there something I'm missing here?

Big Picture: We're using a swf to render custom type and there is a link in the rendered (flash) content. We're hoping to catch the link action in the jQuery listener so we don't have to extend our swf have an optional param to return false on link click.

We thought we got around it, until IE testing commenced...

Let me know if any more info is needed. Thanks!

+3  A: 

The strange thing is that is working in other browsers. Not that it doesn't work in IE. Have a look at this question. Flash objects will always consume the onclick event and not propagate it in javascript code.

kgiannakakis
Yeah. If you want HTML to catch a click in Flash you will have to change the Flash code to pass notification of the click out to JS.
bobince
Wow. Well that is odd indeed! Thank you for you pointing in the right direction.I think we're just going to ditch the pretty flash text. Getting all that info that the click listener is harvesting with this flash text is more trouble than it's worth at this point.Thanks again.
Steve Meisner