Hi Martin,
You could try posting the form to a hidden frame or you could use Javascript remote scripting (JSRS) to communicate the onUnload event to your server. Nigel -- Nigel Hamilton Turbo10 Metasearch Engine email: [EMAIL PROTECTED] tel: +44 (0) 207 987 5460 fax: +44 (0) 207 987 5468 ________________________________________________________________________________ http://turbo10.com Search Deeper. Browse Faster. > 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 > >------------------------------------------------------------------------- > > > > > > > > > >