PDA

View Full Version : Open URL in iFrame from Video Source



idaho22
01-14-2008, 10:52 PM
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

jscheuer1
01-14-2008, 11:35 PM
Most browsers will allow something like so:


<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.

idaho22
01-15-2008, 12:35 AM
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?

jscheuer1
01-15-2008, 03:49 AM
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:


<!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':


<a href="some.htm" target="_self">Normal link</a>