Good morning, friends. I am making a page where there will be some videos from youtube, and with that I will have some links that when activated should pass the respective video into my iframe. But in the whole process, clicking the link in the video, it goes to the entire screen and not into the iframe. Here is the code:
function trocaSrc($a) {
document.getElemtById("iframe1").src = $a.href;
return false;
}
And the links:
<div>
<a href="https://www.youtube.com/embed/18WLEZZVaWY" onClick="return trocaSrc(this);">Video 1</a>
<a href="https://www.youtube.com/embed/0CleeB4bY7U"; onClick="return trocaSrc(this);">Video 2</a>
</div>
I can not find where I'm going wrong ... Thanks in advance for the friends who can afford their time to respond.