I want to have an onUnload that runs only when the site is left, not when
the current page is unloaded. Any ideas?
Thanks!
Ross
Jul 23 '05
35 1829
Ross M. Greenberg wrote: "Randy Webb" <Hi************ @aol.com> wrote in message news:lP******** ************@co mcast.com...
You can take this "challenge" for as long as you want, and you will still ultimately fail in the end. The browser has NO way to know where I am going, unless its from a link within the page.
I thought an event was triggered when a web page is about to be accessed -- aren't custom 404's generated locally for invalid URLs, for example?
That depends on how the server of the invalid URL is setup. But it's
irrelevant. But tell us this.
Lets say I am on page234.html on your site. I have page352.html bookmarked. I click the page352.html bookmark.
Did I leave the site?
If the http://<whatever> is the same, no. If different, yes.
The browser has no way of knowing that. It only knows that you left
*one* page, not how you left, just that the page is unloading. The one
exception would be if you had onclicks in all your links to internal
pages that set a variable, onunload you check that variable. Search the
archives on how its done.
But that still does not cover me leaving one page of your site to
another page of your site via a favorites or by typing in the URL. The answer is no but your script will fail to know that.
The survey in mind seeks to ask them directly what they liked or did not like about the site. I'm seeing more than a few users leaving the site from its home page. I need to find out why so I can fix what they don't like.
Then put the link on the main page. As was pointed out, if the user wants to fill it out, they will. <sarcasm>If they don't, then popping up a survey page will surely entice them to.</sarcasm>
But this was a means to get them to let me know *as* they leave, not when they're still at/just arrived at the site.
Then put the link on all pages. But if people are going to fill it out,
they will do so. Attempting to popup a survey to ask what you thought of
a site is very anti-user oriented.
But there is no way for you to definitively know where I am going when I
leave one page of your site.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Ross M. Greenberg wrote on 15 dec 2004 in comp.lang.javas cript: I thought an event was triggered when a web page is about to be accessed -- aren't custom 404's generated locally for invalid URLs, for example?
No, not if the domain is valid.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
I listened to you folks, and stuck the survey via a link.
"Randy Webb" <Hi************ @aol.com> wrote in message
news:Se******** ************@co mcast.com... Ross M. Greenberg wrote:
"Randy Webb" <Hi************ @aol.com> wrote in message news:lP******** ************@co mcast.com...
You can take this "challenge" for as long as you want, and you will still ultimately fail in the end. The browser has NO way to know where I am going, unless its from a link within the page.
I thought an event was triggered when a web page is about to be
accessed -- aren't custom 404's generated locally for invalid URLs, for example?
That depends on how the server of the invalid URL is setup. But it's irrelevant. But tell us this.
Lets say I am on page234.html on your site. I have page352.html bookmarked. I click the page352.html bookmark.
Did I leave the site?
If the http://<whatever> is the same, no. If different, yes.
The browser has no way of knowing that. It only knows that you left *one* page, not how you left, just that the page is unloading. The one exception would be if you had onclicks in all your links to internal pages that set a variable, onunload you check that variable. Search the archives on how its done.
But that still does not cover me leaving one page of your site to another page of your site via a favorites or by typing in the URL.
The answer is no but your script will fail to know that.
The survey in mind seeks to ask them directly what they liked or did
notlike about the site. I'm seeing more than a few users leaving the site
from
its home page. I need to find out why so I can fix what they don't
like. Then put the link on the main page. As was pointed out, if the user wants to fill it out, they will. <sarcasm>If they don't, then popping up a survey page will surely entice them to.</sarcasm>
But this was a means to get them to let me know *as* they leave, not
when they're still at/just arrived at the site.
Then put the link on all pages. But if people are going to fill it out, they will do so. Attempting to popup a survey to ask what you thought of a site is very anti-user oriented.
But there is no way for you to definitively know where I am going when I leave one page of your site.
-- Randy comp.lang.javas cript FAQ - http://jibbering.com/faq
Well, I stuck the survey in via a link
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.29... Ross M. Greenberg wrote on 15 dec 2004 in comp.lang.javas cript:
I thought an event was triggered when a web page is about to be accessed -- aren't custom 404's generated locally for invalid URLs, for example?
No, not if the domain is valid.
-- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Ross M. Greenberg wrote on 15 dec 2004 in comp.lang.javas cript: "Evertjan." <ex************ **@interxnl.net > wrote in message news:Xn******** ************@19 4.109.133.29... Ross M. Greenberg wrote on 15 dec 2004 in comp.lang.javas cript:
> I thought an event was triggered when a web page is about to be > accessed -- aren't custom 404's generated locally for invalid URLs, > for example? >
No, not if the domain is valid.
Well, I stuck the survey in via a link
[please do not toppost on usenet]
I don't know what you mean by this.
Is your survey stuck in a link?
;-}
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Hi,
Evertjan. wrote: Ross M. Greenberg wrote on 14 dec 2004 in comp.lang.javas cript:
I want to have an onUnload that runs only when the site is left, not when the current page is unloaded. Any ideas?
"site is left" is not defined, [unless you have a button saying "I solemnly declare to leave the site"]
With serverside ASP scripting you could do something ON THE SERVER when a session ends. This is not very reliable and has no effect on clientside.
To be precise, the Session_End event (or similar on other platforms) is
very reliable. It will be called when the Session ends, but the session
often ends on a timeout, typically 20 minutes in ASP.NET, unless the
user is nice enough to press a "Log Off" button (which allows to
terminate the session earlier). The Session_End event *has* to be called
or else the Server process will explode with unroomed resources.
And yes, it has no effect on the client at all.
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Laurent Bugnion wrote on 17 dec 2004 in comp.lang.javas cript: With serverside ASP scripting you could do something ON THE SERVER when a session ends. This is not very reliable and has no effect on clientside. To be precise, the Session_End event (or similar on other platforms) is very reliable. It will be called when the Session ends, but the session often ends on a timeout, typically 20 minutes in ASP.NET,
I was talking ASP, not ASP.NET
unless the user is nice enough to press a "Log Off" button (which allows to terminate the session earlier). The Session_End event *has* to be called or else the Server process will explode with unroomed resources.
Same, not in ASP classic.
And yes, it has no effect on the client at all.
Paradox: some clients gets mad, because of that lack of effect.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Hi,
Evertjan. wrote: Laurent Bugnion wrote on 17 dec 2004 in comp.lang.javas cript:
With serverside ASP scripting you could do something ON THE SERVER when a session ends. This is not very reliable and has no effect on clientside .
To be precise, the Session_End event (or similar on other platforms) is very reliable. It will be called when the Session ends, but the session often ends on a timeout, typically 20 minutes in ASP.NET,
I was talking ASP, not ASP.NET
unless the user is nice enough to press a "Log Off" button (which allows to terminate the session earlier). The Session_End event *has* to be called or else the Server process will explode with unroomed resources.
Same, not in ASP classic.
That's surprising. I believe you, of course (I am much better in ASP.NET
than ASP), but I find the apparent lack of reliability of this critical
event a huge problem for ASP servers. How do you handle this?
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Laurent Bugnion wrote on 19 dec 2004 in comp.lang.javas cript: unless the user is nice enough to press a "Log Off" button (which allows to terminate the session earlier). The Session_End event *has* to be called or else the Server process will explode with unroomed resources.
Same, not in ASP classic.
That's surprising. I believe you, of course (I am much better in ASP.NET than ASP), but I find the apparent lack of reliability of this critical event a huge problem for ASP servers. How do you handle this?
Under ASP, server process will NOT explode.
[Resources are automaticly ended at the end of each page rendering.]
That should make ASP much more reliable than ASP.NET as you describe.
I suppose [I never even tasted it] the problem lies with ASP.NET.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Hi,
Evertjan. wrote: Laurent Bugnion wrote on 19 dec 2004 in comp.lang.javas cript:
unless the user is nice enough to press a "Log Off" button (which allows to terminate the session earlier). The Session_End event *has* to be called or else the Server process will explode with unroomed resources .
Same, not in ASP classic.
That's surprising. I believe you, of course (I am much better in ASP.NET than ASP), but I find the apparent lack of reliability of this critical event a huge problem for ASP servers. How do you handle this?
Under ASP, server process will NOT explode. [Resources are automaticly ended at the end of each page rendering.]
That should make ASP much more reliable than ASP.NET as you describe.
I suppose [I never even tasted it] the problem lies with ASP.NET.
OK, that's the case in ASP.NET too (each Page object is deleted at the
end of every call, and of course its members too), but you also have
Session objects, for example you will save there DB connections, file
contents, "global" variables, etc... IIRC, ASP also have the Application
and Session objects, doesn't it? So my question was, how do you know
when to room the resources saved in the Session object if you don't know
when the said session has timed out?
Sorry, for the more and more OT post, it just made me curious ;-)
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Harry J. Smith |
last post by:
I have written a Visual Basic program that does a long calculation and
writes the results to disk as it runs. If I click the Close button the
window closes but the program keeps running. How can I get the program
to recognize that its window has been closed and quit running?
-Harry http://home.netcom.com/~hjsmith
|
by: razheev |
last post by:
Hi,
I have a Table which contains 1 million rows. I want to do an unload of
the table and do some massaging (tranforming) of data and do a load to
a different table where the column attributes are different.
My question is
1) What options should I use to do a unload so that the unload is very
fast using Platinum Fast unload. The table has many columns which
defined as VARCHAR.
2)Is there a provision to convert the column values from...
|
by: Lauren Hines |
last post by:
Hello,
I have read numerous post stating that the only way to unload an assembly
(DLL in my case) is to create a separate AppDomain, load the assembly, then
unload it by calling AppDomain.Unload.
When trying to delete the DLL file I get an exception that access is denied.
When trying to copy over the DLL file, I get an exception that it is being
used by another process.
|
by: hal |
last post by:
I have an application that includes an activex component
that consumes resources that must be released when the a
page is unloaded.
Toward this end I subscribe to the unload event of the
body of my page in javascript.
However, if I turn on smart navigation, any button that
does a server.transfer fails to fire the javascript unload
event.
|
by: Hal |
last post by:
My most sincere gratitude to anyone who can help me work
around this!
I have work that needs to be done in javascript on the
client whenever a page is unloaded.
To this end, I subscribe to the unload event (client side
not server side) of the <body> HTML element through
javascript.
| |
by: Jon Davis |
last post by:
I'm reposting this because I really need some advice.
I have a web app that makes many queries to the database on every page. In
order to save development effort, I've consolidated all database querying to
methods in a single static class, so whenever I need data, I pass a SQL
string to a method and I am passed a datareader or else individual values
(string, integer, etc).
There is a horrible memory leak in this application. Just one...
|
by: Gauthier Segay |
last post by:
Hello,
I've an application where all my pages implement a PAGE_CODE string
property, this property is stored in HttpContext.Current.Items.
In some page, I must persist data in session while the user perform
operation on this page (postback navigation based). I also need to
clean up the session data when the user leave the page (by a anyway).
My question is about the Unload event, is it safe to use the unload
|
by: Timofmars |
last post by:
I'm try to Unload DB2 data from a table into a record sequential file
on NT. I can an unload on Mainframe, but it doesn't seem to be an
option in NT.
In NT, all I can do is export/import. I can do a Load too, but not an
Unload. I just want the only the data from the table in a record
sequential file. Export seems only to give options to have a delimited
line sequential file or a record sequential file where the data is
preceeded by...
|
by: =?Utf-8?B?QW5keQ==?= |
last post by:
As per the question really.
Not trying to stop them leaving, but just detect WHEN they leave the site
|
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: 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...
| |
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: 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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |