What's the best way to close current window silently after finished a
process.
I'm using the the javascritpt window.close() or top.window.close(), but it
fires a confirmation window.
Just want to close it without any confirmation, seems I done it before, but
can't find where.
Thanks,
Michael. 7 19223
This is not an ASP question, since it's all client-side stuff. One of the
things that may work in browsers today, but shouldn't in the future, is:
window.opener = window;
window.close();
Example:
<htmL>
<body>
<input type="button" onclick="closeIt(false);" value="Close with
confirmation" />
<input type="button" onclick="closeIt(true);" value="Close without
confirmation, probably" />
<script type="text/javascript">
function closeIt(b) {
if(b) { window.opener = window; }
window.close();
}
</script>
</body>
</html>
Ray at home
"MichaelK" <mi******@gomobile.com> wrote in message
news:eU**************@tk2msftngp13.phx.gbl... What's the best way to close current window silently after finished a process. I'm using the the javascritpt window.close() or top.window.close(), but it fires a confirmation window. Just want to close it without any confirmation, seems I done it before, but can't find where.
Thanks, Michael.
Thanks Ray, it's closing window without confirmation, exactly what I was
looking.
Well about not an ASP question, it's how to look at it.
Based on server side process results I generate the page with different
elements
and javascritpt modules which will work on the client side.
Anyway thanks a lot, main thing you helped me.
Regards, Michael
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2****************@TK2MSFTNGP14.phx.gbl... This is not an ASP question, since it's all client-side stuff. One of the things that may work in browsers today, but shouldn't in the future, is:
window.opener = window; window.close();
Example: <htmL> <body> <input type="button" onclick="closeIt(false);" value="Close with confirmation" /> <input type="button" onclick="closeIt(true);" value="Close without confirmation, probably" /> <script type="text/javascript"> function closeIt(b) { if(b) { window.opener = window; } window.close(); } </script> </body> </html>
Ray at home
"MichaelK" <mi******@gomobile.com> wrote in message news:eU**************@tk2msftngp13.phx.gbl... What's the best way to close current window silently after finished a process. I'm using the the javascritpt window.close() or top.window.close(), but it fires a confirmation window. Just want to close it without any confirmation, seems I done it before, but can't find where.
Thanks, Michael.
I understand what you're saying about the asp vs. javascript thing. It's
mostly for your benefit to post in the correct group though. While there
are many ASP experts floating around here, it's not uncommon for those
people to struggle with basic javascript, so you never know what you'll get
when you're in the wrong group.
Ray at home
"MichaelK" <mi******@gomobile.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Thanks Ray, it's closing window without confirmation, exactly what I was looking.
Well about not an ASP question, it's how to look at it. Based on server side process results I generate the page with different elements and javascritpt modules which will work on the client side.
Anyway thanks a lot, main thing you helped me. Regards, Michael
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
Well, I would probably do, just didn't find any good organized javascript
groups.
Have you seen any good ones by chance?
Michael.
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2******************@TK2MSFTNGP09.phx.gbl... I understand what you're saying about the asp vs. javascript thing. It's mostly for your benefit to post in the correct group though. While there are many ASP experts floating around here, it's not uncommon for those people to struggle with basic javascript, so you never know what you'll get when you're in the wrong group.
Ray at home
"MichaelK" <mi******@gomobile.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl... Thanks Ray, it's closing window without confirmation, exactly what I was looking.
Well about not an ASP question, it's how to look at it. Based on server side process results I generate the page with different elements and javascritpt modules which will work on the client side.
Anyway thanks a lot, main thing you helped me. Regards, Michael
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
The one on the MS server isn't bad, it's microsoft.public.scripting.jscript.
But I believe that comp.lang.javascript is a very popular one.
Ray at home
"MichaelK" <mi******@gomobile.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Well, I would probably do, just didn't find any good organized javascript groups. Have you seen any good ones by chance?
MichaelK wrote: Thanks Ray, it's closing window without confirmation, exactly what I was looking.
Well about not an ASP question, it's how to look at it.
Just to add to what Ray said:
If what you are asking about could be applied to a .htm file, then you are
not asking about ASP.
It is to everyone's benefit to keep these newsgroups focussed.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
MichaelK wrote: Well, I would probably do, just didn't find any good organized javascript groups. Have you seen any good ones by chance?
The one you want is
comp.lang.javascript This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Pack Fan |
last post by:
I've noticed that session variables will persist on Mac IE even after all
browser windows have been closed. One must quit the program to clear the
session variables. This presents a security risk...
|
by: Simon Fletcher |
last post by:
Hello there,
I need a "Close Window" script ( onLoad.Close.Window() ), however i need the
script so it don't come up with this annoying window:
"This window is trying to close" window.
Is...
|
by: Graham |
last post by:
What I currently have is a page that opens another browser at 800x600, once
that is loaded I would like to close the orginal page down while keeping the
page that it has just opened open (To make...
|
by: chon |
last post by:
I have an ASP page that is sent a file location as a parameter. It opens
this file, loads the ADODB.Stream object and does a binary write to the page
forcing the download dialog to appear. This...
|
by: Isabel |
last post by:
How can you close all child browser windows that where open by a
parent browser window? I have links on a parent (main) page that
opens the child page as a separate browser. However, I need to be...
|
by: Ron Lautmann |
last post by:
I want to close a browser window so I created a Close button that does this:
private void Button1_Click(object sender, System.EventArgs e)
{...
|
by: Paul |
last post by:
Hi I have a web application that has a log off selection, just redirects the
browser to a form with a label displaying you are loging off. In part of the
application I open a new window and was...
|
by: Jan Tovgaard |
last post by:
Hey everyone:)
We have a critical problem, which I can see that other people also has ran
into.
In Internet Explorer 7 it is no longer possible to do a window.close after
opening a window,...
|
by: Toccoa |
last post by:
After considerable googling - I mean searching with Google(r) - I
could not find javascript on a button or <a href=... to close a
window in the latest versions of IE and FireFox.
There seemed...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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,...
| |