SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Sep 2003
    Location
    Narnia
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mac ie 5.2 iframe onload event support

    Hello everyone,

    It seems that on ie 5.2 (mac) the onload event does not work on an iframe. Can anyone verify this, or know if a newer version of mac ie fixes this? Thanks

    Test code:

    Code:
    <iframe width="200" height="200" src="somepage.html" onload="alert('iframe loaded');">
    Edit: I've just tested the onload event on a regular frame and that has failed too.

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE Mac frame support is awful. I just couldn't get it to work. Also, it "forgets" the scrollbars parameter if someone refreshes your page, so if you're relying on scrollbars="no" then IE for Mac will screw that up too!

    Yuck! Sorry.

  3. #3
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to keep the terminology straight: you're referring to a Load event - [window.]onload is an event handler (property). The problem isn't that a Load event 'doesn't work' - all window/frame objects receive and can trap them - but that the onload attribute doesn't appear to be parsed in the <iframe> tag of that particular browser version, so the handler isn't assigned. The usual workaround is to do it the old-fashioned way: bind the handler directly in the document (html file) being loaded in the iframe, using the <body....onload="..." assignment, or in a JS block). Yes, it's inconvenient. You can poll Internet Explorer's document.readyState property to confirm document load, but it's probably not worth the complication. Is there a specific problem you're running afoul of?

    http://www.faqts.com/knowledge_base/view.phtml/aid/7418
    Interesting: http://www.webmasterworld.com/forum21/5017.htm
    Last edited by adios; Jan 6, 2004 at 17:49.
    ::: certified wild guess :::

  4. #4
    SitePoint Member
    Join Date
    Sep 2003
    Location
    Narnia
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the comments guys. i will probably use the onload event of the document inside the iframe, as adios suggested.

    thanks


Bookmarks

Posting Permissions

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