Check the link. The code is there to close the dialog from inside the
iframe

http://feelitfresh.com/web20/jquery-ui-dialog-close/




On Nov 20, 6:59 pm, "markus.staab" <markus.st...@redaxo.de> wrote:
> you have to use
>
> window.parent.$('#dialog')
>
> instead of
>
> $(window.parent.document).find('#dialog');
>
> but you have to make sure, that the jquery.js is also included in the
> parent window.
>
> On 20 Nov., 14:39, Scott González <scott.gonza...@gmail.com> wrote:
>
> > I'm pretty sure jQuery doesn't support cross-window operations.  You
> > need to create a method on the parent window that willclosethe
> >dialogand then call that method from the child window.
>
> > On Nov 18, 1:43 pm, manilodisan <manilodi...@gmail.com> wrote:
>
> > > I'm loading adialogand inside it an iframe to show a form. After
> > > posting the forum via ajax I analyze the response and want toclose
> > > thedialog(born from the parent window) if the response is a
> > > 'success'. Nothing works....any idea how I can make this thing work?
> > > Here's my code:
>
> > > //        post the data
> > > $.post(url, jQuery('#frm_new_folder').serialize(), function (data){
> > >                 //        if the response is success,closethedialog
> > > that was opened from the parent window
> > >                 if ( data == 'success' ) {
> > >                         var d = $(window.parent.document).find
> > > ('#dialog');
> > >                         d.dialog('close');
> > >                 }
> > >                 else {
> > >                         $('#file_manager_new_folder_receiver').html
> > > (data);
> > >                 }
>
> > > });
>
> > > P.S. Sorry if it's a duplicate. I'm so lost in this napple/google
> > > thing,

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to