473,379 Members | 1,191 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Close Page

It doesn't seem like it should be that hard but how do I close a page?
Nov 18 '05 #1
5 4000
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****@foundation.sdsu.edu> wrote in message
news:uV**************@TK2MSFTNGP11.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****@foundation.sdsu.edu> wrote in message
news:uV**************@TK2MSFTNGP11.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_darkfalz.com> wrote in message
news:ex**************@TK2MSFTNGP10.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****@foundation.sdsu.edu> wrote in message
news:uV**************@TK2MSFTNGP11.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_darkfalz.com> wrote in message
news:ex**************@TK2MSFTNGP10.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****@foundation.sdsu.edu> wrote in message
news:uV**************@TK2MSFTNGP11.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.Percentage reaches 100.

Page_Load
{
UpdateProgress();
}

UpdateProgress()
{
if(progress.Percentage < 100)
Page.Response.Write("Meta HTTP-EQUIV=Refresh CONTENT=3>");

else
Page.RegisterStartupScript("OnLoad",
"<script language=javascript>" +
"windows.close()" +
"</script>");
}
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ex**************@TK2MSFTNGP10.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****@foundation.sdsu.edu> wrote in message
news:uV**************@TK2MSFTNGP11.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
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
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...
4
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...
6
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...
1
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...
4
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...
1
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",...
5
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...
7
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...
2
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.