Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open a dialog outside the iframe

I'm calling a jQueryUI Dialog inside the iframe which looks like this:

enter image description here

But i need the dialog outside the iframe (like window.parent ----> open dialog or something like that).

like image 395
Jhonatan Sandoval Avatar asked Jan 27 '14 19:01

Jhonatan Sandoval


1 Answers

First, you need to initialize the dialog in the parent with autoOpen set to false if thats the case.

$("#dialog").dialog({ autoOpen: false });

After you can open it from the iframe by adding parent. before the expression:

parent.$("#dialog").dialog("open");
like image 90
G.Mendes Avatar answered Sep 18 '22 07:09

G.Mendes