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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer IE problem with javascript, flash, innerHTML

    hello everyone ,

    i am new to this forum and am hoping someone can help me. i have only just begun to become familiar with javascript and this is my first time ever posting a question on a forum such as this so please excuse any ignorance on my part.

    i am having difficulty getting flash to load in IE (all versions - but, works great in FF, google chrome, safari) using "body onload" to call a javascript function that uses innerHTML.

    i have been all over google but haven't been able to find anything tailored enough to my exact problem, due to my limited knowledge on scripting. i also installed a javascript debugger plug-in for IE but it fails to show any error upon loading the page. here's the code:


    page URI:

    http://zego.biz/usa/test/zego-sports...ccessories.php


    relevant xhtml:

    Code:
    <head>
    <script type="text/javascript" src="/usa/scripts/pagescripts.js"></script>
    <script type="text/javascript" src="/usa/scripts/flashobject.js"></script>
    </head>
    
    <body class="accessories" onload="flash();flash2()">
    
    <div id="flashheader"></div>
    
    <div id="flashmodel"></div>
    
    <div id="flashfooter"></div>

    content of pagescripts.js file:

    Code:
     function flash(){
    
    document.getElementById('flashheader').innerHTML='<object width=\"760\" height=\"90\" codebase=\"http://www.adobe.com/go/getflashplayer/" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"><param value=\"header3.swf\" name=\"movie\"/><param value=\"high\" name=\"quality\"/><param value=\"transparent\" name=\"wmode\"/><embed width=\"760\" height=\"90\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" quality=\"high\" src=\"http://zego.biz/usa/swf/header3.swf\"/></object>';
    
    document.getElementById('flashfooter').innerHTML='<object width=\"760\" height=\"48\" codebase=\"http://www.adobe.com/go/getflashplayer/" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"><param value=\"footer4.swf\" name=\"movie\"/><param value=\"high\" name=\"quality\"/><param value=\"transparent\" name=\"wmode\"/><img src=\"http://zego.biz/usa/images/footer.jpg\" width=\"760\" height=\"48\"/><embed width=\"760\" height=\"48\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" quality=\"high\" src=\"http://zego.biz/usa/swf/footer4.swf\"/></object>';
    
          }
    
     function flash2(){
    
    document.getElementById('flashmodel').innerHTML='<object width=\"495\" height=\"350\" codebase=\"http://www.adobe.com/go/getflashplayer/" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"><param value=\"zegomodel.swf\" name=\"movie\"/><param value=\"high\" name=\"quality\"/><embed width=\"495\" height=\"350\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" quality=\"high\" src=\"http://zego.biz/usa/swf/zegomodel.swf\"/></object>';
    
          }

    thank you in advance for your time.

  • #2
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For me the answer was here:
    http://blog.tremend.ro/2008/08/06/di...ing-innerhtml/

    I found the following worked in both IE6 and FF (video425x344 is the id of a div):

    Code:
       document.getElementById("video425x344").innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="425" height="344"><param name="movie" value="http://www.youtube.com/v/'+videoid[n]+'&hl=en&fs=1"></param><param name="wmode" value="opaque"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+videoid[n]+'&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344" wmode="opaque"></embed></object>';


  •  

    Tags for this Thread

    Posting Permissions

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