Advanced Search

Results 1 to 4 of 4

Thread: Open URL in iFrame from Video Source

  1. #1
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Open URL in iFrame from Video Source

    I have encoded a video with a link. I want the link to open in an iframe located on the same page as the video. The link is embedded in the video and that is the most I can do from that perspective. The video platform will only allow me to put in a URL, no HTML.....nothing else. Anyone have an idea of how I can accomplish this with some JS? I really could use some help with this.
    Thank you in advance with any help or suggestions you might be able to provide.
    Idaho22

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,694
    Thanks
    43
    Thanked 3,132 Times in 3,096 Posts
    Blog Entries
    12

    Default

    Most browsers will allow something like so:

    HTML Code:
    <iframe name="vid" width=425 height=350 src="about:blank"></iframe><br>
    <a href="http://www.youtube.com/v/HhDQju-sor8" target="vid">Load Video</a>
    No javascript required.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks John but this opens the video up in the frame. I have a video that I have encoded with a link inside the video playing on the same page that the iframe is in. I need the link www.funspot.com in the video for example to load into the iframe. Any suggestions?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,694
    Thanks
    43
    Thanked 3,132 Times in 3,096 Posts
    Blog Entries
    12

    Default

    That would have to be a part of the Flash Action Script of the video before it was compiled, which can also provide hooks for javascript for this and other purposes, but it would have to be a part of the Flash video before it was compiled, or perhaps done as I outline below. Videos (the part shot with a camera or otherwise encoded into an flv or other raw video format), as far as I know cannot, in themselves, have links.

    But I'm no expert on the various video formats, so there may be some other ways I don't know about. In any case, if it really is a link, it will be subject to the base target of the page. So, you could try that:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <base target="vidlink">
    </head>
    <body>
    <iframe name="vidlink" width=425 height=350 src="about:blank"></iframe><br>
    <object . . . video code here >
    <param . . . >
    <embed . . . >
    </object>
    </body>
    </html>
    Other links on the page would need to be targeted to _self if you wanted them to act 'normally':

    Code:
    <a href="some.htm" target="_self">Normal link</a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •