Hi all,
I want to dynamically change the SRC of an <EMBED> element but it seems that it doesn't work altough that if I retrieve the src attribute after change it, it's ok.
<body>
...
<EMBED name="video" id="video" src="" width="200" height="198" showControls="0" enablecontextmenu="0" fullScreen="0" autostart="false">
...
</body>
<script>
document.all.video.src="MOV1.MPG";
alert(video.src);
document.all.video.play();
</script>
It doesn't matter if the path it's relative or absolute, the final result is the same:
"JavaScript error: The object doesn't accept this property or method"
Any suggestions?
I want to dynamically change the SRC of an <EMBED> element but it seems that it doesn't work altough that if I retrieve the src attribute after change it, it's ok.
<body>
...
<EMBED name="video" id="video" src="" width="200" height="198" showControls="0" enablecontextmenu="0" fullScreen="0" autostart="false">
...
</body>
<script>
document.all.video.src="MOV1.MPG";
alert(video.src);
document.all.video.play();
</script>
It doesn't matter if the path it's relative or absolute, the final result is the same:
"JavaScript error: The object doesn't accept this property or method"
Any suggestions?