RSS

way of calling “javascript function of parent window from child window.”

26 Jun

i am  explain how to call the javascript function of a parent window from the child window(pop-Up).

Parent Java Script Function:

<script language=”Javascript” type=”text/javascript”>

function CallAlert()

{

alert(“This is parent window’s alert function.”);

}

</script>

Child window’s Java Script Function:

<script language=”Javascript” type=”text/javascript”>

function SetParentWindowsHiddenFieldValue()

<script language=”Javascript” type=”text/javascript”>

function SetParentWindowsHiddenFieldValue()

{

window.opener.document.getElementById(“HiddenField1”).value =

document.getElementById(“TextBox1”).value;

return false;

}

function CallParentWindowFunction()

{

window.opener.CallAlert();

return false;

}

</script>

Advertisements
 
Leave a comment

Posted by on June 26, 2010 in ASP Dot Net C#

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: