Javascript window.onmouseout or window.onMouseLeave not working RRS feed

  • Question

  • Hi,

    i want to close the window when mouse moves out of window boundary.

    i have a parent window & i am creating new child widow using window.showModelessDialog

    I want to close this child window (window.showModelessDialog) when mouse moves out of the child window.

    I have tried my luck with window.onMouseLeave,window.onmouseout but it doesn't fires up.

    When i attached mouseout with document it worked but i want to cover window boundary.

    Any help on this will be very helpful


    • Edited by Mahesh Khiste Monday, December 5, 2011 2:51 PM wrong formatiing
    Monday, December 5, 2011 2:50 PM

All replies

  • Hi, I know its really old now only i have seen the post and i replied so that others could use as reference

    //Add jquery reference here
        var quickOffset =$("#quicksearchResultsTable").offset();
        var quickOffsetleft = parseInt($(document).width());
        var quickOffsetright = quickOffsetleft +300;
     var quickOffsettop = parseInt(document).height());
        var quickOffsetbottom = quickOffsettop+400;

      if((e.pageX > quickOffsetleft) && (e.pageX < quickOffsetright)&&(e.pageY > quickOffsettop) &&(e.pageY < quickOffsetbottom))
    //close it here

    Thursday, May 17, 2012 5:41 AM