Fire Hand
Fire Hand

Reputation: 26356

Return value from modal dialog loaded page to parent page in .net using jQuery UI Dialog

I was trying to to create a pop up page using jQuery UI Dialog which will load another .net page in the modal dialog. I was wondering how to return values to parent page when a link button in gridview is clicked on the modal dialog?

Upvotes: 0

Views: 1765

Answers (1)

Macy Abbey
Macy Abbey

Reputation: 3887

If you can count on the page loaded in the modal dialog being served from the same domain as the parent page, then you can simply refer to a javascript function in the parent when a link is clicked like so:

$('.gridviewlink').click(function(){
    parent.someFunc(infoToPass);
});

If you cannot count on that, then you will have to use cross domain iframe communication techniques. Here's a good article: http://softwareas.com/cross-domain-communication-with-iframes.

Upvotes: 1

Related Questions