Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2004
    Location
    California
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OnFocus - works in IE not in Firefox :(

    anyone have any idea why this code doesn't work in firefox?

    <table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr>
    <td width="75%"><IFRAME name="body" onFocus="alert('test me');" src="http://www.yahoo.com" width="100%" height="400" style="border: 1px solid #000000"> </IFRAME></td>
    </tr>
    </table>

    I'm just trying to cue a javascript event (onFocus). It works in IE when you click on the iframe, but in firefox.. nothing. Am I missing something?
    thanks all!

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    "This [onfocus] attribute may be used with the following elements: A, AREA,
    LABEL, INPUT, SELECT, TEXTAREA, and BUTTON."
    http://www.w3.org/TR/html401/interac...l#adef-onfocus

    So, Mozilla does not have to support onfocus for iframe.

    Same thing with Opera 7.x's

    "Show Active frame border setting (Preferences.../Page Style): When you view framed pages, the currently active frame will always be outlined."
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •