Results 1 to 7 of 7

Thread: iframe problem in HTML5

  1. #1
    Join Date
    Jan 2006
    Location
    Derbyshire, UK
    Posts
    74
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default iframe problem in HTML5

    I've been using this code to give me 3 image links that change the pages being displayed in an <iframe name="a-comments"> and they worked fine.
    I've tried using them in a HTML5 test and changed it to <iframe id="a-comments"> in order to validate the code and they work great in Chrome but Firefox and IE8 open the links in a new tab. Any ideas whats going on?
    The code...
    Code:
    <a href="media/mad-mountainbikes.htm" target="a-comments" title="Photos &amp; Films (Default)"><img src="../img/icon-med.png" width="30" height="30" alt="media"></a>&nbsp;
    <a href="../reviews/mad-mountainbikes-reviews.php" target="a-comments" title="Reviews"><img src="../img/icon-rev.png" width="35" height="29" alt="reviews"></a>&nbsp;
    <a href="social/mad-mountainbikes.htm" target="a-comments" title="Social Media"><img src="../img/icon-soc.png" width="30" height="30" alt="social"></a>
    Last edited by Burgin; 08-02-2011 at 01:03 PM.

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    the name on iframes is still valid in html5. Always double-check validator errors in html5 mode (it's still experimental).

  3. #3
    Join Date
    Jan 2006
    Location
    Derbyshire, UK
    Posts
    74
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default

    Thanks traq

    I also had to remove a few meta tags I liked to use, could they possibly be valid? Whats a good way to double check?

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    if you can follow it, the w3c spec (which I liked to above) is best.

    however, a better approach is to rely on what works as opposed to what is technically valid - many parts of html5 aren't supported - or not widely supported - yet.

    could you post the <meta> tags in question?

  5. #5
    Join Date
    Jan 2006
    Location
    Derbyshire, UK
    Posts
    74
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default

    Here they are...

    <meta name="distribution" content="global" />
    <meta name="copyright" content="Cherrys MOT Centre" />
    <meta name="owner" content="Cherrys MOT Centre" />

  6. #6
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    huh... I didn't realize, but it seems that html5 defines valid meta tag names. You can also propose your own.

    on the other hand, just because these are "invalid" doesn't mean you can't use them. They will simply be ignored - but guess what, current browsers ignore them anyway. I'd say, leave them in if you prefer.

  7. #7
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    557
    Thanks
    8
    Thanked 66 Times in 66 Posts

    Default

    I didn't know you could do that in HTML5 either. Interesting.

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
  •