473,657 Members | 2,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Close Page

It doesn't seem like it should be that hard but how do I close a page?
Nov 18 '05 #1
5 4010
clientside code
windows.close()

Mind you they will get a warning/notice.

You can't do any window manipulation with SERVER side code like asp/asp.net

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"- Steve -" <se****@foundat ion.sdsu.edu> wrote in message
news:uV******** ******@TK2MSFTN GP11.phx.gbl...
It doesn't seem like it should be that hard but how do I close a page?

Nov 18 '05 #2
javascript code
window.close();

that should do the job

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"- Steve -" <se****@foundat ion.sdsu.edu> wrote in message
news:uV******** ******@TK2MSFTN GP11.phx.gbl...
It doesn't seem like it should be that hard but how do I close a page?

Nov 18 '05 #3
> You can't do any window manipulation with SERVER side code like
asp/asp.net
Duh, of course.

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:ex******** ******@TK2MSFTN GP10.phx.gbl... clientside code
windows.close()

Mind you they will get a warning/notice.

You can't do any window manipulation with SERVER side code like
asp/asp.net

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"- Steve -" <se****@foundat ion.sdsu.edu> wrote in message
news:uV******** ******@TK2MSFTN GP11.phx.gbl...
It doesn't seem like it should be that hard but how do I close a page?


Nov 18 '05 #4
You can avoid the warning:

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

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:ex******** ******@TK2MSFTN GP10.phx.gbl...
clientside code
windows.close()

Mind you they will get a warning/notice.

You can't do any window manipulation with SERVER side code like asp/asp.net
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"- Steve -" <se****@foundat ion.sdsu.edu> wrote in message
news:uV******** ******@TK2MSFTN GP11.phx.gbl...
It doesn't seem like it should be that hard but how do I close a page?


Nov 18 '05 #5
Shouldn't this work, causing the browser to close once it
progress.Percen tage reaches 100.

Page_Load
{
UpdateProgress( );
}

UpdateProgress( )
{
if(progress.Per centage < 100)
Page.Response.W rite("Meta HTTP-EQUIV=Refresh CONTENT=3>");

else
Page.RegisterSt artupScript("On Load",
"<script language=javasc ript>" +
"windows.close( )" +
"</script>");
}
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:ex******** ******@TK2MSFTN GP10.phx.gbl...
clientside code
windows.close()

Mind you they will get a warning/notice.

You can't do any window manipulation with SERVER side code like
asp/asp.net

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"- Steve -" <se****@foundat ion.sdsu.edu> wrote in message
news:uV******** ******@TK2MSFTN GP11.phx.gbl...
It doesn't seem like it should be that hard but how do I close a page?


Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
5169
by: Jenny | last post by:
I open page 1 and page 2 from main page. I want to close page 2 from page 1 after I finish processing some work in page 1. Does anyone know how to do that? Thanks, Jenny
28
14244
by: PerryC | last post by:
Anyone know how to auto close the parent / opener window without confirmation? I have tried: <script> opener.window.close() </script> ----I put it in the child html page, and nothing happen!!---
4
34862
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen as a new window. The original window plus the Modally opened Pop remain in a separate window. What I want to do is close the popup and return to the original window with its view state maintained. The control use to fire the popup window...
6
4591
by: No_Excuses | last post by:
All, I am interested in reading the text of a web page and parsing it. After searching on this newgroup I decided to use the following: ******************************* START OF CODE ************************ String sTemp = "http://cgi3.igl.net/cgi-bin/ladder/teamsql/team_view.cgi?ladd=teamknights&num=238&showall=1"; WebRequest myWebRequest = WebRequest.Create(sTemp); WebResponse myWebResponse = myWebRequest.GetResponse();
1
1463
by: Bob | last post by:
Is this a good way to close DB Connection in ASP.NET? I've been trying to come up a way to close DB connection automatically (or sort of) in my ASP.NET application without having to write the close() method everywhere. Every web page in my application needs to call the database, and all DB access and SQL Command code are wrapped in a separate class (called DBAccess below). I don't want to open and close the connection within every...
4
1914
by: louise raisbeck | last post by:
I have this scenario (simplified) function addnewdata () { check for partial match already in db for information entered by user if (partialmatch succeeds) { open new window aspx page (using javascript) with a datagrid of these partial match records (by doing a sqlcommand using some query string values taken from opener data entered) *** }
1
33143
by: nebulus | last post by:
I'm working on a web app that under normal circumstances will be happy with the Session_OnEnd event, but when a user leaves a page by closing the browser by either Alt+F4 or just hitting the "X", I'll need to kill the session. Now, with the onbeforeunload event, I can handle this quite easily in IE, but in FireFox, it's another matter. For one thing, FireFox seems to empty out its event object on a page unload, so it's very hard to track...
5
34359
by: jimmy | last post by:
Hi all, I want to capture the event when the browser's close button is clicked in an html page. I tried using the event.ClientX and event.ClientY property in the body unload event, and this helps to recognise whether the close button is clicked( also differentiates whethet refresh was clicked). The problem arises whenever i try to close the window by resizing it or by right clicking at the bottom of the page and then closing it. Can...
7
3342
by: tapanreddy | last post by:
I am looking to perform an action when we close the window using the close tab at the top of the screen. I know how to do it using a close button but I was wondering if there is way to achieve the above. Waiting for some suggestions Thanks
2
6751
by: kurt sune | last post by:
Hello, I have a weird problem, I hope someone can explain this for me. I have a webpage using masterpage. In it I create a popup window using this code: Dim js As String = "<script language=javascript>" js &= "var newWin = window.showModalDialog('InkommetVi.aspx" js &= "',null,"
0
8394
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.