User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 374,611 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,491 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

javascript in mozilla firefox

Join Date: Jan 2006
Posts: 2
Reputation: ramesh_karanam is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ramesh_karanam ramesh_karanam is offline Offline
Newbie Poster

Re: javascript in mozilla firefox

  #5  
Jan 19th, 2006
Thanks for the reply Greer...

But, my requirement is to show a pop-up if on close of the browser window. The below sample script is working well in IE but not in FireFox.

Could you please let me know the solution for Firefox .....

<html><head><title>Test</title> 
<script language ="Javascript"> 
 
function unLoadFnc(event) 
{
 if(window.event.clientX<-2000 && window.event.clientY<-2000)
 {
  alert("Closing the window .. ");
 }
 else
 {
  alert("Something else..");
 }
}
 
</script> 
</head> 
<body onUnload="unLoadFnc(event)"> 
Sample Html. 
</body> 
</html> 

Regards,
Ramesh
Last edited by tgreer : Jan 19th, 2006 at 9:08 am. Reason: Added code tags
Reply With Quote  
All times are GMT -4. The time now is 8:34 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC