-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: Rohit_BD
Message 2 in Discussion
This is possible, but you will need a good knowledge of JavaScript and how events are
fired and handled in .NET. On the main (or parent aspx page): 1) Create a dummy button
server-control (say btnDummy). 2) Create it's OnClick handler (server-side), say
btnDummy_Click(...) 3) In Page_Load(), write: btnDummy.Style.Add("visibility",
"hidden") 4) In the parent page's HTML view, in the <script></script> block, add the
following function: <script> function getDataFromPopUp([parameter list]) {
//Fill any hidden HTMLControl fields with the parameters with //the
parameters in [parameter list] for use in server-side code.
__doPostBack("btnDummy", ""); } </script> 5) In the server-side event handler
of btnDummy (say, btnDummy_Click(...)), do the required operations. On the pop-up's
ASPX in HTML view: 1) Write following in <script></script> block: <script>
function submitDataToParent() { if(varOK != null) {
if(varOK == true) {
window.opener.getDataFromPopUp([parameters]); window.close(); //This is
optional, in case you want to close the window. } } }
</script> 2) In pop-up's HTML view, in <body> tag, write: <body
onload="submitDataToParent();"> 3) Write following code (I am using C#) in the
Page_Load event handler: Response.Write("<script>var varOK = false;</script>");
Alternatively, you can also add the line <script>var varOK = false;</script> on the
top of the page in HTML view. In this case, the Response.Write... part need not be
done. 4) Write following code (I am using C#) in the server-side event handler of
whichever control is supposed to send data to the parent window:
Response.Write("<script>if(varOK != null) varOK = true;</script>"); Note: The above
will work correctly only under IE4+, as far as I know.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]