Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 30th, 2007, 01:22 AM
Authorized User
 
Join Date: Nov 2006
Location: Mandi, Himachal Pradesh, India.
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to akhilhp
Default Closing a Page.

I wish to close the opened page after we click a specific close button on the page. How to do it.

Akhilesh
 
Old April 30th, 2007, 02:21 AM
Friend of Wrox
Points: 1,935, Level: 17
Points: 1,935, Level: 17 Points: 1,935, Level: 17 Points: 1,935, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try javascript's window.close() method

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
 
Old May 1st, 2007, 02:16 AM
Authorized User
 
Join Date: Nov 2006
Location: Mandi, Himachal Pradesh, India.
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to akhilhp
Default

Thanks Mike... It is working...

But it is asking the question :
The Web page you are viewing is trying to close the windows
Do you want to close this window...

and then after clicking yes only it closes the page.
Is there any way to avoid this message? I have very little knowledge of javascript. so could not do it myself..

Akhilesh
 
Old May 1st, 2007, 10:03 AM
Friend of Wrox
Points: 1,935, Level: 17
Points: 1,935, Level: 17 Points: 1,935, Level: 17 Points: 1,935, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

use like this

window.opener = null;
window.close();

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing page without prompt in IE7 gp_mk ASP.NET 1.0 and 1.1 Professional 2 November 22nd, 2006 10:29 AM
Redirect to new page without closing current page peter2004 ASP.NET 2.0 Basics 5 June 5th, 2006 08:49 PM
closing Form kobystud C# 4 July 1st, 2004 03:34 PM
closing a pop up which also goes to a new page twowoo HTML Code Clinic 2 October 21st, 2003 04:00 AM
Closing ADO connections in new page darrenw SQL Server 2000 0 September 15th, 2003 11:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.