Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

iframes and targets

  • 03-07-2012 12:15am
    #1
    Registered Users, Registered Users 2 Posts: 22,584 ✭✭✭✭


    Can anyone tell me what I'm doing wrong here:

    [HTML]<!DOCTYPE html>
    <html>
    <head>
    <title>Videos test</title>
    <style type="text/css">
    #vidcontainer{
    width:600px;
    height:450px;
    float:left;
    margin-left:15px;
    border-style:groove
    }
    </style>
    </head>
    <body>
    <a href="http://www.youtube-nocookie.com/embed/-slyeyhwE68?rel=0&wmode=transparent&autoplay=1&quot; target="vidcontainer">Father Ted</a>
    <br/>
    <a href="http://www.youtube-nocookie.com/embed/7xnNhzgcWTk?rel=0&wmode=transparent&autoplay=1&quot; target="vidcontainer">Fawlty Towers</a>
    <hr/>
    <iframe id="vidcontainer"></iframe>
    </body>
    </html>
    [/HTML]

    I've reduced the code to the above in an effort to debug - basically I want an iframe that displays a youtube vid based on the link that is clicked outside of the iframe - hence the "target=" bit.

    It works fine in chrome not in FF / IE and I'm not sure why.

    Chrome throws this exception but still works:
    Unsafe JavaScript attempt to access frame with URL file:*path*/test.html from frame with URL http://www.youtube-nocookie.com/embed/-slyeyhwE68?rel=0&wmode=transparent&autoplay=1. Domains, protocols and ports must match.

    FF & IE both open the link as if I'd specified target="_blank"

    Do I have to create individual html pages on the same domain with the vids embedded in them and then point the iframe to them for this approach to work?


Comments

  • Registered Users, Registered Users 2 Posts: 1,110 ✭✭✭Skrynesaver


      <iframe name="vidcontainer"></iframe>
    


  • Registered Users, Registered Users 2 Posts: 22,584 ✭✭✭✭Steve


    Doh..:o

    Bloody Chrome and it's ability to self-fix obvious code errors without telling you...

    Cheers for that.


Advertisement