Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OnUnload Event not firing in IE 5.5 SP1

Status
Not open for further replies.

JennL

Programmer
Joined
Sep 11, 2003
Messages
31
Location
US
I am writing code that allows users to display a list of available part numbers and lets them reserve them by checking the boxes and submitting. To prevent multiple people in the app from reserving the same parts, I have a lock flag I put on the file. While the list is displayed, the flag is set to 1. If the user leaves the page without submitting the form I want to reset that flag to 0 - this is done in a separate page which I use for timeouts as well.

I'm using the onUnload event on the body tag. All the users are on IE5+. This code works fine from many machines (even my IE6 SP1) but not for one user with IE5.5 SP1. He has javascript enabled. There "should" not be a google toolbar or any popup blocker software installed. Any other possible solutions? Is there a better way to write this code?


body tag code:
onUnload="unLockEMS('close')"
function:
function unLockEMS(sType){
//if the hStartNo is not blank, form is being resubmitted so keep EMS locked
//if hStartNo is blank, then unlock EMS
if (document.SpecStart.hStartNo.value.length ==0) {
var page = "include/ems_timeout.asp?iSeq=" + iSeq;
var windowprops = "width=100,height=100,location=no,menubar=no,toolbar=no,scrollbars=no,resizable=no";
newWindow = window.open(page,'PopupName',windowprops);
newWindow.blur();
window.focus();
if (sType != 'close') {
alert("Session terminated due to inactivity.");
location.href = "request.asp";
}
}
}
 
Found the answer, figured I'd share in case someone else runs across this. The engineer was using the Yahoo! desktop toolbar. This installs with popup blocker automatically enabled as default. You can opt to allow popup windows on the internal network. This fixed the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top