开发者

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 th开发者_开发知识库e modal dialog?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜