I'm trying to pass the youtube URL to the embed src. It's working in Firefox but not IE or Chrome. Can someone please help me?
<script>
function videoplaying() {
var myvideo = "http://www.youtube.com/v/2wBe3SDCcz8";
var myEmbed = document.getElementById("myvideo");
myEmbed.setAttribute("src", myvideo);
return false;
}
</script>
<a href="javascript:void(0)" onclick="videoplaying();">Video</a>