Safari related ? event handlers not being called

Discussion in 'Javascript' started by Martha Vineyard, Dec 16, 2003.

  1. Hi,

    I have a site which I tested today for Safari compatibility and found the event handlers assigned in-line in a DIV declaration were
    not being called. Example :

    <DIV unselectable="on" ID="subCat1"
    style="text-align:center; color:#ID4921; font-family:Arial Bold; font-size:14; position:absolute; left:254; top:337; width:122;
    visibility:visible;"
    onmouseenter="gotMouse()" onmouseleave="gotMouseOut()" onclick="gotSelected()">
    Sapphire
    </DIV>

    No error is thrown but the 'gotMouse, 'gotMouseOut, and 'gotSelected functions are not being called. Works fine in IE 5/6.

    Appreciate any ideas.

    thanks, Bill Woodruff
    dotScience
    Chiang Mai, Thailand
     
    Martha Vineyard, Dec 16, 2003
    #1
    1. Advertising

  2. Martha Vineyard wrote:

    > I have a site which I tested today for Safari compatibility and found the event handlers assigned in-line in a DIV declaration were
    > not being called. Example :
    >
    > <DIV unselectable="on" ID="subCat1"
    > style="text-align:center; color:#ID4921; font-family:Arial Bold; font-size:14; position:absolute; left:254; top:337; width:122;
    > visibility:visible;"
    > onmouseenter="gotMouse()" onmouseleave="gotMouseOut()" onclick="gotSelected()">
    > Sapphire
    > </DIV>
    >
    > No error is thrown but the 'gotMouse, 'gotMouseOut, and 'gotSelected functions are not being called. Works fine in IE 5/6.


    onmouseenter/leave are IE5.5/6 on Win only, I wouldn't advise to use
    them unless you have an intranet with IE5.5/6/Win clients only.
    HTML 4 defines
    onmouseout
    onmouseover
    and Safari is more likely to implement those.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Dec 16, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Edward Bills
    Replies:
    0
    Views:
    454
    Edward Bills
    Aug 25, 2004
  2. S_K
    Replies:
    6
    Views:
    1,188
    Robert Dunlop
    Nov 8, 2007
  3. Andy Baldwin

    Event handlers called twice, or not at all

    Andy Baldwin, Oct 14, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    201
    vbMental
    Oct 29, 2004
  4. Craig
    Replies:
    1
    Views:
    130
  5. Andy Baldwin

    Event handlers called twice, or not at all

    Andy Baldwin, Oct 14, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    289
    vbMental
    Oct 29, 2004
Loading...

Share This Page