wood burning stoves*
The moose likes JSP and the fly likes Events in JSP are not supported in Mozilla Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Events in JSP are not supported in Mozilla

Pooja Chetty
Greenhorn

Joined: Aug 01, 2006
Posts: 13
Saifu,

My problem is i am using events for invalidating the session. In Mozilla it is not able to recognize events.

I am giving the code snipet i am using please see that and help me in that regrard

// JS Part

function unLoadFnc(evt)
{
var isMozilla = navigator.userAgent.indexOf('Mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) less than 5;
var isIE = navigator.userAgent.indexOf('MSIE') != -1;


var e = (window.event) ? window.event : evt;
var ie5 = true;
if(isMozilla == "Mozilla"){
ie5 = true;
}


var offsetx=ie5? window.event.clientX : e.clientX
var offsety=ie5? window.event.clientY : e.clientY

alert(offsetx);
alert(offsety);
}


// Jsp calling part

body class="bg_white" onunload="unLoadFnc(event)"

In IE i am getting the offsetX,offsetY variabled based on the position of the hyperlink i am clicking where as in Mozilla or Opera i am getting them as undefined


Thanks and Regards
Pooja
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61456
    
  67

Please continue any conversation in your original post, which has been moved to the approriate forum. Do not start new topics in the middle of a conversation. Thanks.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: Events in JSP are not supported in Mozilla