Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Multiple Video Links targeting on iFrame - all on the same page

raabi

New Coder
Hi everyone!
This is my 1st post.

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 show up in the "VidFrame" iframe.

Regards
 
Thanks the "Oldman" for the response. My Website is down, at the moment. I will try your tip, after it is up.
Secondly, I am not sure, what should I put in src=''. Would you kindly give me a hint on that!

Regards
 
The iframe tag is used to display a web page inside a web page. When you create a document to be inside an iframe, any links in that frame will automatically open in that same frame. But with the attribute on the link (the element or elements), you can specify where the links will open.


The first step is to give your iframe a unique name with the name attribute. Then, it's a matter of pointing your links at that frame using the ID as the value of the target attribute:


<iframe src="example.htm" name="page"></iframe>
<a href="https://www.example.com" target="page">Example</a>




If you add a target to an ID that doesn't exist in the current browser session, the link will open in a new browser window, with that name. After the first time, any links that point to that named target will open in the same new window.


If you don't want to name every window or every frame with an ID, you can still target some specific windows without needing a named window or frame. These are called the standard targets.
 

Latest posts

Buy us a coffee!

Back
Top Bottom