[thelist] JavaScript call form submit

Tim Stewart tstewart at gisca.adelaide.edu.au
Sun May 21 23:30:46 2000


Jeff said

<<why not just have a script that runs serverside that cleans up any user
session that is older than the specified session time limit.>>

I had been considering timestamping the server session objects and doing a
periodic clearout, but this method is a little vague for my liking - a
question of finding a compromise between conserving server system resources
and allowing users to gaze at pages for as long as they like without being
rudely disconnected.

Anyway, I found the answer (which is, of course, blatantly obvious when
you've wasted hours trying to figure it out):

<tip type="JavaScript events">
You can't refer to any objects of the current document from it's unload
event, but you can refer to the root window object, allowing you to open a
new browser window, display an alert/confirm, call a server side script or
whatever if the user leaves your page by shutting down the browser.
</tip>

Tim Stewart
tstewart@gisca.adelaide.edu.au