Jump to content

Multiple Video links targeting one iFrame


Raabianony

Recommended Posts

Hi everyone!
This is my 1st post here.

I have 5 video links, to different videos, on my Web page; like
video 1 link
video 2 link
----
----
video 5 link

I have one iFrame, on the same Web page as the links;

<iframe name="VidFrame" width="800px" height="450px"
src="????" frameborder="0" allowfullscreen>
</iframe>"

I want that; if a user clicks any of the links, that particular video should appear in the "VidFrame" iframe.

Regards

Link to comment
Share on other sites

If the href attribute of the link is pointing to the video file then you can set the target attribute to "VidFrame" and it should open the video in the frame.

Link to comment
Share on other sites

Thanks for the response.

The actual links are as below:

<a id="Genome" target="VidFrame" href="www.informix.pk/Videos/Genome.mp4"> Human Genome</a>
<a id="KKC" target="VidFrame" href="www.informix.pk/Videos/KKC.mp4"> Human Genome</a>
<a id="Nutrition" target="VidFrame" href="www.informix.pk/Videos/Genome.mp4"> Food and Nutrition</a>

The code for the iFrame is;

<iframe name="VidFrame" width="800px" height="450px" src="I don't know" frameborder="0" allowfullscreen> </iframe>"

The hyperlinks and the iFrame are on the same page. This code doesn't help.

Please help.

 

Link to comment
Share on other sites

If you are using absolute URLs with the domain name in them, you need to prefix your URLs with http:// or https:// depending on whether your server supports secure connections or not.

It would be better to use relative URLs, where that wouldn't matter. Relative URLs don't need the domain name, so they would look like this:

<a id="Genome" target="VidFrame" href="/Videos/Genome.mp4"> Human Genome</a>
<a id="KKC" target="VidFrame" href="/Videos/KKC.mp4"> Human Genome</a>
<a id="Nutrition" target="VidFrame" href="/Videos/Genome.mp4"> Food and Nutrition</a>

 

Link to comment
Share on other sites

Your web host seems to be configured to download the file instead of displaying it.

Fixing that might be complicated since web server configuration depends on what server software is being used. If your server uses Apache, you might be able to set the content type header and try to remove the content disposition header if there is one.

If server configuration is not possible then you can create an HTML page for each video with a  <video> tag in it and then link to the HTML page instead.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...