Working in IE but not work in firefox

Posted on 2006-06-21
Last Modified: 2012-05-05
Hi Expert!
I have code lines:
<body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0" onunload = "if (screenTop > 9999) DeleteUserOnline();" >
it's working in IE but not work in firefox, why? Help me
My requirement when user click the "X" to close browser(IE, Firefox) onunload event appear to call javascript funtion . Please help me.
Question by:duynnh
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 63

Expert Comment

ID: 16956692
The upper if condition is already a dirty trick working in IE only because of programmatic misbehavior. You cannot expect a bug from IE to work also in FF.
There is no way to detect window closing in browser.
LVL 30

Expert Comment

ID: 16956743
i agree with Zvonko. you can only do this with IE.
LVL 30

Accepted Solution

third earned 250 total points
ID: 16956791

Author Comment

ID: 16956965
But with code lines i run in IE as well.(I'm using Ajax .NET Pro).

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question