How can I understand when auser of the web page pres the reload button
of the web browaser or when he press enter in the line where the
internet address is inserted? I'd like capture this event to manage it.
Thanks,
Marco 3 1770 my****@yahoo.it wrote: How can I understand when auser of the web page pres the reload button of the web browaser or when he press enter in the line where the internet address is inserted?
You can't distinguish reloading from entering an URL, following a link,
or closing the browser window. All of these user actions simply cause
an unload event.
ciao, dhgm
> You can't distinguish reloading from entering an URL, following a link, or closing the browser window. All of these user actions simply cause an unload event.
Argh!
In my web page where I use javascript I can see that IE e Mozilla have
different behaviours!
How can I capture the unload event with javascript?
Thank very much,
Marco
In article <o_************ **********@news 4.tin.it>, my****@yahoo.it
wrote: How can I capture the unload event with javascript?
Here is an example html file. I do not recommend pestering the user
when doing an onunload. New browsers limit what can be down in the
onunload event.
Robert
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>onunlo ad tests</title>
<script type="text/javascript">
function leaving()
{
var newWindow;
newWindow = window.open(
"http://www.yahoo.com",
"debug",
"scrollbars,res izable,location ,width=700,heig ht=500");
alert("please come back soon.");
}
</script>
</head>
<body onunload="leavi ng()">
<p>Let's pester the user when leaving our window.
</p>
</body>
</html> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve |
last post by:
I'm working in PHP, but am also using JavaScript, so perhaps there is
a better way to do this using more PHP code......
I setup a search screen for my database, the user enters data and
submits a form via POST
From that I get a results list screen, based on data I submit via a
form from the search screen
In the results list screen, I have a button next to each record for
|
by: Ellinghaus, Lance |
last post by:
> > Other surprises: Deprecating reload()
>Reload doesn't work the way most people think
>it does: if you've got any references to the old module,
>they stay around. They aren't replaced.
>It was a good idea, but the implementation simply
>doesn't do what the idea promises.
I agree that it does not really work as most people think it does, but how
|
by: Chris |
last post by:
Hello, I have an input box and a button and when the user clicks the
button, the contents of the input box are placed on the page in list
form. But, when the enter key is used it's as if the page is reloaded
because the page is returned to its initial form with the list gone.
I also have some hidden fields that I make visible, which are also
returned to their hidden state. I'm hoping somebody can help me.
<HTML>
<HEAD>...
|
by: Alan Z. Scharf |
last post by:
1. I have a chain of six asynch callbacks initiated by a button, and want
the page to refresh at the end of each callback to display
A. Results of a SQLServer query showing cumulative running time, and
B. A progress bar.
2. I have this working with a refresh timer:
<META http-equiv="refresh" content="5">
|
by: David Veeneman |
last post by:
I'm just getting started with ASP.NET, using VS 2005. As an exercise, I
opened the root web site in VS 2005 and created a simple welcome page. I
saved the page as Default.aspx and made sure that name was the first name on
the list id the default documents in the IIS control panel.
IIS doesn't recognize Default.aspx as the default page for the IIS root web.
It will open the page if I type http://localhost/Default.aspx, and if I
create an...
| |
by: gen_tricomi |
last post by:
Python 2.4.2 (#67, Sep 28 2005, 12:41:11)
on win32
Type "copyright", "credits" or "license()" for more information.
****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet....
|
by: bernhard.voigt |
last post by:
Hey!
I'm using ipython as my python shell and often run scripts with the
magic command %run:
In : %run script.py
If modules are loaded within the script these are not reloaded when I
rerun the script. Hence, when I changed some of the modules loaded, I
have to call
|
by: Stef Mientki |
last post by:
hello,
I've a graphical application (wxPython),
where the code in the main GUI loop is given below.
1 JAL_Loaded = False
2 while len(App_Running) 0:
3 if JALsPy_globals.State == SS_Run:
4 try:
|
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...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |