Page view counter

Equivalent IE statement for Mozilla

Last post 10-13-2008 5:42 PM by djacks14. 4 replies.

Sort Posts:

  • Equivalent IE statement for Mozilla

    10-08-2008, 6:51 PM
    • Loading...
    • djacks14
    • Joined on 06-28-2007, 12:15 PM
    • Posts 29
    • Points 32

    Hi all,

    I am currently using the statement

    var ev= window.mainZoneFrameA.event?window.mainZoneFrameA.event:e  

    to grab a that frame in order to get the mouse coordinates when clicked in that frame.  This works fine in IE7 but is not the case in FireFox.  I was wondering if anyone knew how to make this a viable statement in FireFox.

  • Re: Equivalent IE statement for Mozilla

    10-08-2008, 11:50 PM
    • Loading...
    • NHOQUE
    • Joined on 04-02-2008, 9:00 AM
    • Kumamoto, Japan
    • Posts 814
    • Points 4,965

    What is mainZoneFrameA?

    if you use

    var ev=window.event, does it work in IE'?

    Thanks.

    HOQUE MD.NAZMUL
    [document.getReaders]
  • Re: Equivalent IE statement for Mozilla

    10-09-2008, 5:29 PM
    • Loading...
    • djacks14
    • Joined on 06-28-2007, 12:15 PM
    • Posts 29
    • Points 32

    The reason I am using window.mainZoneFrameA is that I want to get a reference to that iFrame called mainZoneFrameA and do some manipulation in this frame.

    var ev=window.event does work in IE but it does not serve the purpose I am looking for. I need it to be based on mainZoneFrameA and also work in both IE and Firefox.

    HTH

  • Re: Equivalent IE statement for Mozilla

    10-11-2008, 9:33 AM
    Answer
    • Loading...
    • NC01
    • Joined on 08-26-2005, 7:33 PM
    • Posts 13,275
    • Points 71,391
    • TrustedFriends-MVPs

    Try:

    var ev = (window.mainZoneFrameA.event) ? window.mainZoneFrameA.event : (window.mainZoneFrameA.window.event) ? window.mainZoneFrameA.window.event : e;

    NC...

  • Re: Equivalent IE statement for Mozilla

    10-13-2008, 5:42 PM
    Answer
    • Loading...
    • djacks14
    • Joined on 06-28-2007, 12:15 PM
    • Posts 29
    • Points 32

    I found out that IE uses the id attribute to get the element while Mozilla was using the name attribute.  So I just had to do id="mainZoneFrameA" name="mainZoneFrameA" for it to work.

Page 1 of 1 (5 items)