Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello friends

I am Passing value from parent to child window created by Pop up but how can any one guide me??
Posted

JavaScript
<script>
var oPopup = window.createPopup();
function richDialog(obj)
{
   oPopup.document.body.innerHTML = obj;
   oPopup.show();
}
</script>
 
Share this answer
 
v2
Comments
RaisKazi 30-Sep-11 5:05am    
Use "<pre>" Tag to enclose your code block.
you can send through querystring variable


XML
<script language="javascript" type="text/javascript">

 function openpopup(url)
    {
    
window.open(url, 'pop_window','toolbar=no,menubar=no,location=no,scrollbars=yes,height=300,width=450,left=200,top=200');

    }



//call from code behind
Page.ClientScript.RegisterStartupScript(this.GetType(), "aa", "<script language='javascript'>openpopup('page1.aspx?variable="+variabledata+"');</script>");
 
Share this answer
 
v3
Hi,

passing data from one window to another through javascript means you can do it when you want to pass small amnt of data.


If you want to pass large data you've to follow through session variable

In first page code store required data in session variable .After that in second page code use that session variable data .

Instead of session you can use xml or any other files.But my prefer is use session
b'coz after user logouts session variables are cleared out .files are not.


I hope you understood What I said .

All the Best
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900