...

View Full Version : Javascript & Flash video problem in IE



let2008
05-02-2008, 06:54 AM
PLs Help me to check what is wrong with this code?




<!--<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">

function change(node) {
var video = document.getElementById('video_container');
var n_video = video.cloneNode(true);

n_video.src = "flash/video" + node.value + ".swf";

video.parentNode.replaceChild(n_video, video);
}



</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function change(node) {
var video = document.getElementById('video_container');
var o_param = video.getElementsByTagName('param')[0];
var src = 'flash/video' + node.value + '.swf';
o_param.value = src;

var embd = video.getElementsByTagName('embed')[0];
embd.setAttribute('src', src);

var n_video = video.cloneNode(true);



video.parentNode.replaceChild(n_video, video);
}

</SCRIPT>-->
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function change(node) {
var video = document.getElementById('video_container');
var o_param = video.getElementsByTagName('param')[0];
var src = 'flash/video' + node.value + '.swf';
o_param.value = src;


if (typeof window.event == 'undefined') {

var embd = video.getElementsByTagName('embed')[0];

embd.setAttribute('src', src);

}

var n_video = video.cloneNode(true);



video.parentNode.replaceChild(n_video, video);
}

</SCRIPT>
<table>
<tr>

<td style="padding-left:0px;"><table width="204" border="0" cellpadding="0" cellspacing="0">

<tr>
<td colspan="3" style=" border-bottom:#ffffff 1px solid"><a href="index.php?l1=163&l2=166"><img src="img/latestnews.gif" alt="news" width="204" height="41" border="0" /></a></td>
</tr>
<tr>
<td colspan="0" bgcolor="#c0c8c7" align="left" > <? include("small.php"); ?></td>
</tr>
<tr><td height="7px" bgcolor="#ffffff"></td></tr>
<tr>
<td colspan="3" bgcolor="#c0c8c7" height="10" style="padding-left:4px; border-bottom:#999999 1px solid;" align="left" ><img src="css/arrow_blue.gif" width="8" height="9" /><a href="quote.php"><font color="#4a5e5c"> Find Quotes and Indices</font></a></td></tr>
</table></td>

</tr>
<table><tr width="204px" bgcolor="#c0c8c7">

<td align="right"><table width="100&#37;" border="0" cellpadding="3">

<tr>

<td>Video
<select name="select" style="width:140px;" onchange="change(this);">



<option id="0" value="0">VFM - ad</option>

<option id="1" value="1">VFM - Introduction</option>

<option id="2" value="2">VFM - VietNam: The potential market</option>

</select> </td>

</tr>
</table>

<!--<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="202" HEIGHT="220" id="video_container"><param name="movie" value="flash/video0.swf" /><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="flash/video0.swf" id="video_container" quality=high bgcolor=#FFFFFF WIDTH="202" HEIGHT="200"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT></tr></table>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="170" HEIGHT="220"><param name="quality" value="high" />
<embed src="flash/video0.swf" width="170" height="220" loop="false" align="right" id="video_container" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" AUTOPLAY="FALSE" play="false"></embed> </object> -->

<!--<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"" width="202" height="200" id="video_container"><param name="movie" value="flash/video0.swf" /> <param name="quality" value="high" /> </object> -->

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="202" height="230" id="video_container">
<param name="movie" value="flash/video0.swf" />
<embed src="flash/video0.swf" width="202" height="230"
quality="high" name="movie"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"/>
</object>


</tr></table>

Output link:http://www.purpleasia.com/clients/VFM_test/index.php?l1=161
The problem is video at right hand side ,it's working in firefox but in IE can not change the video from select box.
Any ideas for this. thanks so much.

tagnu
05-02-2008, 11:24 AM
Sorry, the link doesn't work

let2008
05-02-2008, 11:50 AM
Sorry, the link doesn't work

I fixed the link.Thanks

Aradon
05-02-2008, 03:14 PM
Java != javascript

Moved to the correct forums



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum