Briskstar Technologies
Briskstar Technologies

Reputation: 2251

send data from jquery dialog to parent page

I have used jquery ui dialog using IFrame and passed URL to that IFrame. So new page opened in dialog box in Iframe.

After some processing in that dialog box page. I want to pass some data from that dialog box to my page on close event.

Please help.

Upvotes: 0

Views: 1167

Answers (2)

Bipul
Bipul

Reputation: 1367

Don't know if it is the only solution, but you can write the data you want to pass to some invisible element in the close event of the dialog.

Example:

$("..").dialog({...}).bind('dialogclose',function(){
          $("#someInvisibleElement").val(data);
});

Upvotes: 1

Per Kastman
Per Kastman

Reputation: 4504

To access the parent page on an iframe you can use window.parent

Upvotes: 0

Related Questions