Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: onUnload Event Mystery


Message #1 by "Joshua M. Ollila" <jollila@p...> on Tue, 19 Dec 2000 16:31:30 -0000
Greetings,

Perhaps you could try opening a new window with the session variables
added to the query string when the onUnload event fires.

For example, call this function from <BODY onUnload="destroy()">
--------------------------------------------------------
function destroy() {
// use Server-side scripting to enter these variables
var sessionvars = whatever;
	if (!yourwindow || yourwindow.closed) {
var newlocation = "www.mydomain.com/default.html?var1=" + sessionvars
var yourwindow 
window.open(newlocation,"yourwindow","width=300,height=300");
	}
}
--------------------------------------------------------
I would definitely try using server-sided scripting (ASP, PHP3, etc.) to
Response.Write these session variables into the HTML of that page.  For
the URL where the new window opens, you could have some server-sided
scripting interpret the query string of "var1=" ( or even use the
window.location.search property in JavaScript).

That is I believe the easiest way to store client-side data via scripting.

Hope this Helps,
Reginald Dawson

--- 
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development, 
Web Development, Networking & Communications, and Hardware & Systems.  
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to javascript as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-javascript-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index