Is it possible to close a page using Javascript that will close *after* the
page is loaded (it's an ASP page that performs an action). 5 10448
Steve <st***@hello.co m> wrote: Is it possible to close a page using Javascript that will close *after* the page is loaded (it's an ASP page that performs an action).
<html>
<head>
<script>
function ready() {
window.close();
}
</script></head>
<body onload="ready() ;">
</body></html>
? Insert whatever actions you need to perform before window.close().
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Christopher Benson-Manica said the following on 9/16/2005 12:04 PM: Steve <st***@hello.co m> wrote:
Is it possible to close a page using Javascript that will close *after* the page is loaded (it's an ASP page that performs an action).
<html> <head> <script> function ready() { window.close(); } </script></head> <body onload="ready() ;"> </body></html>
? Insert whatever actions you need to perform before window.close().
"Script is attempting to close the page......."
And yes, I can make IE close a window that script didn't open. The
Unconditional Truth will set you free if you search the archives for it.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Randy Webb <Hi************ @aol.com> wrote: And yes, I can make IE close a window that script didn't open. The Unconditional Truth will set you free if you search the archives for it.
Hm, I see, although it seems that defeating protection offered by the
browser should be done with care.
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Christopher Benson-Manica said the following on 9/16/2005 1:22 PM: Randy Webb <Hi************ @aol.com> wrote:
And yes, I can make IE close a window that script didn't open. The Uncondition al Truth will set you free if you search the archives for it.
Hm, I see, although it seems that defeating protection offered by the browser should be done with care.
Whether that protection is offered by the browser is debatable though.
Mozilla based browsers do not allow it, in any form. Other browsers do,
and IE does it back to at least IE5.0/Win so it's hard to claim it as a
bug, and if it's not a bug then it's an undocumented feature. And IE is
not the only browser that does it.
So, if a browser intentionally allows you to do it, then how is that
browser safeguarding against it?
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Steve wrote: Is it possible to close a page using Javascript that will close *after* the page is loaded (it's an ASP page that performs an action).
Why not have the ASP page return a 204 response instead? http://www.w3.org/Protocols/rfc2616/...html#sec10.2.5
--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andras Gilicz |
last post by:
Hi VB fans
I'm working on a relatively large project in VB6 with about a dozen
forms, including graphs, labels, text boxes, etc. The software itself
is actually a flow simulator with more or less complex technical
calculations, several input variables. I would like to equipp the
starting panel with the usual New, Open, Save, Save As, Close...
|
by: CST |
last post by:
Hi All,
I have a "Digital Dashboard" that basically has 4 IFrame sections.
The page flows in the following order: Messages, Stocks, Weather, User
Links. Please note that this order needs to stay that way.
Everything but the Stocks section is pulled from our dB. I am using
the server control InetCtls.Inet to obtain the stock data from...
|
by: JSjones |
last post by:
when a form is submitted from the main window i want a pop up window
to open from the onclick event. i have that working, now how can i
close the pop up window from the main window after the main window
finishes loading? i've been racking my brain on this for the last two
days. here is the code for the parent window that i have been testing...
|
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 all works fine. If the user
selects "Open" or "Cancel", the window closes, which is the desired behavior.
If they select "Save", the location dialog...
|
by: Marshall Dudley |
last post by:
I have an application where in a shopping cart checkout a popup appears
which suggests other items that may go with what was ordered with a
button to add these items to the cart. When the button in the popup is
clicked, the popup should present an added items to cart message, close,
and reload the parent window, so the parent will show the...
| |
by: mcyi2mr3 |
last post by:
Hi all
I'm new to javascript and im trying to add a close button function to
my certain pages of my site. I use this code:
<a href='javascript:window.close();'>Close Window</a>
to create a hyperlink which closes the window. However with pages which
display data retrieved from a database using PHP i use a form to submit
a search on the...
|
by: mark |
last post by:
Hi
I am trying to count the number of times a page loads. When I hit the submit
button I can get the page to count once using ispostback to check . I am
trying to incriment a variable everytime the page loads. It will only do it
one time even if I put the
variable = variable + 1
statement into the button click event.
Any ideas as to how...
|
by: Joris De Groote |
last post by:
Hi,
I use Adobe Acrobat to read tekst from PDF files. After that the file has
been read, I move the file in a folder (using the date I got from the text I
got from Acrobat). Now here is my problem. When I want to move the file, I
get an error stating:
System.IO.IOException: The process cannot access the file...
|
by: mikeJS |
last post by:
Hi I was not sure where to post this as it is an asp page
basicaly i am using an asp page to send data from a flash form to MS access DB
however when the data is sent the asp page loads as a blank page is there a way for it to auto close after it sends the data
this is the asp
<%@language = "VBScript" %>
<%
|
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...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
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. ...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |