Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript & Flash video problem in IE

    PLs Help me to check what is wrong with this code?


    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/VF...dex.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.
    Last edited by let2008; 05-02-2008 at 11:49 AM.

  • #2
    Regular Coder
    Join Date
    Nov 2007
    Location
    127.0.0.1
    Posts
    348
    Thanks
    26
    Thanked 40 Times in 39 Posts
    Sorry, the link doesn't work

  • #3
    New to the CF scene
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by tagnu View Post
    Sorry, the link doesn't work
    I fixed the link.Thanks

  • #4
    Regular Coder Aradon's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    734
    Thanks
    0
    Thanked 20 Times in 19 Posts
    Java != javascript

    Moved to the correct forums
    "To iterate is human, to recurse divine." -L. Peter Deutsch


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •