Ok Brandon,

I found this in another post:

var doc = $('#testframe')[0].contentWindow.document;
$(doc.body).append('<span>test</span>');

This seems like it would help, but I am not sure how to use this,
along with what you posted to get it working correctly.  Somehow
sending the GET within the context of the contentWindow is confusing
me, and I just can't get it working.

On Sep 15, 9:18 am, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> To see what I mean run this in Firebug:
> $('iframe')[0].contentWindow.$ = $;
>
> Then click on the link in the iframe and it will behave as you expect.
>
> --
> Brandon Aaron
>
> On Mon, Sep 15, 2008 at 9:13 AM, Brandon Aaron <[EMAIL PROTECTED]>wrote:
>
> > This would work if you used the frames parent instance of jQuery. LiveQuery
> > works by monitoring the DOM methods within jQuery. Since within the frame
> > you are using a new instance of jQuery, LiveQuery will not be monitoring its
> > DOM methods.
> > --
> > Brandon Aaron
>
> > On Sun, Sep 14, 2008 at 11:04 PM, hubbs <[EMAIL PROTECTED]> wrote:
>
> >> I can confirm that using event delegation will fix this problem.  I
> >> guess that it is just a problem with the LiveQuery plugin.  Brandon,
> >> if you are where around here, could you comment on this?
>
> >> Thanks.
>
> >> On Sep 14, 2:29 pm, hubbs <[EMAIL PROTECTED]> wrote:
> >> > I have a working example of this, and would really like help
> >> > understanding why bind or livequery does not bind events to DOM
> >> > elements that are inserted from an iframe.
>
> >> >http://web2.puc.edu/PUC/files/bind.html
>
> >> > Clicking the "insert from frame" link will append links to the parent
> >> > frame, which won't pick up the click event.  But, clicking the "insert
> >> > from body" link will append links within the same frame and will
> >> > correctly have the click events bound.
>
> >> > Why is this happening?
>
> >> > On Sep 12, 9:02 pm, hubbs <[EMAIL PROTECTED]> wrote:
>
> >> > > I have been experiencing strangeness with trying tobindevents to DOM
> >> > > elements that have been inserted from a different frame using .get().
> >> > > For some reason the elements don't be binded with the events if they
> >> > > are inserted from other frame.  In testing, if I try the same
> >> thingwithinthe SAME frame the the events get binded correctly.
>
> >> > > Am I missing something here?  Is this a limitation of jQuery?

Reply via email to