jack
jack

Reputation: 126

Using Jquery, How can we call parent function from child dialog window

I am open one child page from Lookup.aspx page with following code.

So how can i call my lookup.aspx function inside treeviewlookup.aspx page ?

var page = "../Page/TreeviewLookup.aspx";

var $dialog = $('#dvItemGroupTreeView')
                           .html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>')
                           .dialog({
                               autoOpen: false,
                               modal: true,
                               height: 475,
                               width: 400
     }

                           });

 $dialog.dialog('open');

In treeview.aspx page what code require ?

Upvotes: 1

Views: 5738

Answers (1)

harshboss
harshboss

Reputation: 276

You need to call parent function from child page as

If your function in Parent page as

Parent Treeview.aspx Page

<script>

function fnParentCheck()
{
    alert('calling from Parent');
}
</script>

Child Page as TreeviewLookup.aspx

<script>

      window.parent.fnParentCheck();
</script>

Upvotes: 3

Related Questions