-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: rathod_s
Message 9 in Discussion
Hi,
I got ur point . i tried the same way . but event.srcElement.name is coming
null can you rectify it.
<script language="javascript">
var ObjWin;
//var srcElement = 0;
function EmailPopUp()
{
//srcElement++;
ObjWin =
window.open("../Switch.aspx","EmailEquipmentPolicy",'resizable=1,width=400,height=450,Left=350,top=150');
}
function Exit()
{
alert(event.srcElement.name);
if (event.button == 2 || event.button == 3)
{
document.write("button clicked");
}
else
{
if(ObjWin != null && !ObjWin.closed)
{
ObjWin.close();
}
}
}
</script>
</HEAD>
<body id="parentid" bgcolor="#fecc4d"
MS_POSITIONING="GridLayout" onunload="Exit()">
<form id="Form1" method="post" runat="server">
<A href="JavaScript:EmailPopUp()">Email this page</A>
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute;
TOP: 48px" runat="server"
Text="Button" Width="93px" Height="28px"></asp:Button>
<asp:Button ID="Button2" Runat="server" Text="button2"
CausesValidation="False"></asp:Button>
</form>
</body>
Thanks.
KmspsmK <[EMAIL PROTECTED]> wrote:
New Message on BDOTNET
asp.net
Reply
Reply to Sender Recommend
Message 5 in Discussion
From: KmspsmK
Use the event.srcElement.name element to figure out if it's a button click that
triggered the unload event, if it is, open a window. When parent window is 'X'
ed, the event.srcElement.name will not be the button, then close the child.
I hope that makes it clear.
Enjoy !
View other groups in this category.
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_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]