How to close a window

Dear All,

I have a form which is opened up in a frame, to be exact in the right Frame of a frame window. This form have a button for exiting the application and bring the user back to the login page. When user click on the Exit button it confirms and if use click on OK the that form, may be with the frame, and application should close and take the user back to the login screen. I have tried with the following code but it does not work out.

window.opener = self;

window.close();

I badly need help for this.

Thanks

[705 byte] By [SNNgaihte] at [2008-1-8]
# 1

Hello SN,

Thanks for your post in MSDN forums.

You can try the following sample codes to close a window within the frame and check if it works for you.
<INPUT TYPE="button" VALUE="Close this Window" onClick="top.close();">

Hope this helps,

Sincerely,
Ji Cheng Wang
Microsoft Online Community Support

JiChengWang-MSFT at 2007-10-2 > top of Msdn Tech,.NET Development,JScript for the .NET Framework...
# 2

Change it to

<button onclick="location='logonpage.aspx'">Close Window</button>

SLTDon at 2007-10-2 > top of Msdn Tech,.NET Development,JScript for the .NET Framework...

.NET Development

Site Classified