Raabianony Posted August 21, 2021 Share Posted August 21, 2021 Hi everyone!This is my 1st post here.I have 5 video links, to different videos, on my Web page; likevideo 1 linkvideo 2 link--------video 5 linkI 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 More sharing options...
Ingolme Posted August 21, 2021 Share Posted August 21, 2021 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 More sharing options...
Raabianony Posted August 21, 2021 Author Share Posted August 21, 2021 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 More sharing options...
Ingolme Posted August 22, 2021 Share Posted August 22, 2021 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 More sharing options...
Raabianony Posted August 22, 2021 Author Share Posted August 22, 2021 Thank you very much, Ingolme, for the help. Have a great time. Raabi Link to comment Share on other sites More sharing options...
Raabianony Posted August 22, 2021 Author Share Posted August 22, 2021 Hello again! The suggestion by Ingolme works fine on the local PC. But on the Website, the links download the selected video, instead of displaying the video within iFrame. I need another push - please help. Raabi Link to comment Share on other sites More sharing options...
Ingolme Posted August 22, 2021 Share Posted August 22, 2021 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now