Ok, lets take a step back.  Lets say I want to just try and bind the
events, rather than using Livequery to see if this fixes the problem.

Since I want to bind the draggable UI, how would I do this?  What kind
of event does the draggable get, click?

    $("#adminEditListingB .itemHolder a").draggable({
            helper: 'clone',
            appendTo: 'body',
            cursor: 'move'
        });

How could I rebind this, and hopefully fix the cross frame problem?

On Aug 24, 6:25 pm, hubbs <[EMAIL PROTECTED]> wrote:
> I worked on another, simpler example of reloading the listing with a
> link, and I get the same unwanted results.
>
> In the iframe:
>     $("#refreshB").click(function() {
>         $.ajax({
>             type: "GET",
>             url: "http://www.mysite.com";,
>             beforeSend: function() {
>                 $("#adminToolsListingB .scroll",
> parent.document).html("");
>                 $("#adminToolsListingB .ajaxLoading",
> parent.document).show();
>             },
>             success: function(html) {
>                 $("#adminToolsListingB .ajaxLoading",
> parent.document).hide();
>                 $("#adminEditListingB .scroll",
> parent.document).html(html);
>             }
>         });
>         return false;
>     });
>
> The link:
> <a href="#" id="refreshB">Refresh</a>
>
> Still not rebinding the events in the parent frame.  I am missing
> something here?  It seems that this should work, as it is updating the
> DOM in the parent frame correctly, and I would expect Livequery to see
> that, and rebind.
>
> On Aug 24, 4:02 pm, hubbs <[EMAIL PROTECTED]> wrote:
>
> > I am trying to track down a problem, and I am wondering if it has to
> > do with iFrames.
>
> > I use livequery to rebind some the jQuery UI draggable event to a list
> > of links.  I have an ajax refresh button, which refreshes the list,
> > and livequery rebinds the draggable events, which works great.
>
> > But, I have an iFrame on the page which will create a new link within
> > that list.  So, after the form is submitted in the iframe, it uses
> > the .ajax() GET method to reload the list of links in the parent
> > window, exactly how the ajax refresh button works.  But, it seems that
> > livequery is not rebinding the UI draggable events, and I am wondering
> > if it is because the change came from the iFrame.
>
> > Does this seem like it could be the problem, or should I keep digging?
>
> > This one works:
> >                    $.ajax({
> >                         type: "GET",
> >                         url: "http://www.mysite.com";,
> >                         beforeSend: function() {
> >                             $("#adminToolsListingA .scroll").html("");
> >                             $
> > ("#adminToolsListingA .ajaxLoading").show();
> >                         },
> >                         success: function(html) {
> >                             $
> > ("#adminToolsListingA .ajaxLoading").hide();
> >                             $
> > ("#adminEditListingA .scroll").html(html);
> >                         }
> >                     });
>
> > This one does not:
> >                     $.ajax({
> >                         type: "GET",
> >                         url: "http://www.mysite.com";,
> >                         beforeSend: function() {
> >                             $("#adminToolsListingB .scroll",
> > parent.document).html("");
> >                             $("#adminToolsListingB .ajaxLoading",
> > parent.document).show();
> >                         },
> >                         success: function(html) {
> >                             $("#adminToolsListingB .ajaxLoading",
> > parent.document).hide();
> >                             $("#adminEditListingB .scroll",
> > parent.document).html(html);
> >                         }
> >                     });
>
> > Livequery binding draggable UI:
> >     $("#adminEditListingB .itemHolder a").livequery(function() {
> >         $(this).draggable({
> >             helper: 'clone',
> >             appendTo: 'body',
> >             cursor: 'move'
> >         });
> >     });

Reply via email to