The simple onUnload() construction will not work. You will have to open a new browser window on unload displaying the output of your server program.
martin Medi Montaseri wrote: >I know this is off topic, but I thought someone could use a break... > >Given a page called xyz.html, I want to measure the amount of time a >user spent >on this screen (or page) along with other usability metrics. So I >figured I'll use >JavaScript since its running the entire time the page is up. > >Then I decided to use onload() and onunload() events to determine start >and end >of the session. > >The onload() part is easy. However when onunload() event happens, I need >to >execute a server side program and feed it the data that was collected. > >So I figured I setup a dumy form and invoke form.submit() onUnload. >Would this work or is there a better method. > >I also thought about a redirect followed by another rediect to where the >user wanted >to go, but that gets too browser dependent and I don't like it when >others hijak my >browser. > > >-- >------------------------------------------------------------------------- >Medi Montaseri [EMAIL PROTECTED] >Unix Distributed Systems Engineer HTTP://www.CyberShell.com >CyberShell Engineering >------------------------------------------------------------------------- > > > > -- http://www.meome.de -------------------------------------------------- Martin Haase-Thomas | Tel.: 030 43730-558 meOme AG | Fax.: 030 43730-555 Software Development | [EMAIL PROTECTED] --------------------------------------------------