Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 248615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:21:28+00:00 2026-05-11T21:21:28+00:00

Below function is working fine for IE, but not working for Mozilla and other

  • 0

Below function is working fine for IE, but not working for Mozilla and other browsers:

function CloseSession() {        
 alert("Inside Close");  
  if ((window.event.clientX < 0) || (window.event.clientY<0)) {  
    alert("Inside Events");  
    location.href = '/forms/sessionkill.aspx';  
  }    
}

What I am trying to do is, I have a button on a page after clicking on that button, a page in opened in new window having session, the session will be maintained until user closes the browser. on the new page there is right navigation which have different links for different pages. If I directly call my sessionkill.aspx it kills the session whenever a link is clicked on window unload function.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:21:28+00:00Added an answer on May 11, 2026 at 9:21 pm

    Mozilla does not set the global window.event property.

    I’d recommend using an AJAX framework, such as JQuery (or even Microsoft AJAX).

    function CloseSession(event) {   
      // use Mozilla event parameter, or window.event if that was not passed     
      event = event || window.event; 
      alert("Inside Close");  
      if ((event.clientX < 0) || (event.clientY<0)) {  
        alert("Inside Events");  
        location.href = '/forms/sessionkill.aspx';  
      }    
    }
    

    Update: if you were using JQuery:

    function CloseSession(e) {   
      alert("Inside Close");  
      if ((e.pageX < 0) || (e.pageX < 0)) {  
        alert("Inside Events");  
        location.href = '/forms/sessionkill.aspx';  
      }    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 116k
  • Answers 116k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Based on your use of Field<T>, the objects in dataTable… May 11, 2026 at 10:34 pm
  • Editorial Team
    Editorial Team added an answer operator+= is not a composite of + and =, therefore… May 11, 2026 at 10:34 pm
  • Editorial Team
    Editorial Team added an answer if (document.referrer != "") { var referringURL = document.referrer; var… May 11, 2026 at 10:34 pm

Related Questions

I want to call a c# function from my javascript function. I have a
Hi I have an ajax script which validates the users information put into textboxes.
I tried to write a function to check key code with JavaScript. It's working
I'm having a serious issue with Internet Explorer caching results from a JQuery Ajax

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.