Javascript help - use writedocument with opennewwindow

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • loredana
    New Member
    • Nov 2006
    • 3

    Javascript help - use writedocument with opennewwindow

    Hi,

    I have a javascript automatically created by adobe captivate 2 to generate an html file that integrates the desired my.swf file and the skin for the flash player (my_skin.swf).

    The script within the html page is this:

    [HTML]<script type="text/javascript">
    <!--
    writeDocument(' <object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,29,0" width="790" height="565" ID="Captivate1" >'+
    '<param name="movie" value="supplier _list_skin.swf" >'+
    '<param name="quality" value="high">'+
    '<param name="loop" value="0">'+
    '<embed src="supplier_l ist_skin.swf" width="790" height="565" loop="0" quality="high" pluginspage="ht tp://www.macromedia. com/go/getflashplayer" type="applicati on/x-shockwave-flash" menu="false"></embed>'+
    '</object>');
    //-->
    </script>
    <object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,29,0" width="790" height="575">
    <param name="movie" value="supplier _list_skin.swf" >
    <param name="quality" value="high">
    <param name="loop" value="0">
    <embed src="supplier_l ist_skin.swf" width="790" height="575" loop="0" quality="high" pluginspage="ht tp://www.macromedia. com/go/getflashplayer" type="applicati on/x-shockwave-flash" menu="false"></embed>
    </object>
    </noscript>
    [/HTML]
    The script in standard.js is this:

    Code:
    function writeDocument(s){document.write(s);}
    What I want to know is how do I integrate this script with one that will open a new window that has no scrollbars, no toolbar, no menubar, etc. I want to control the window that the flash file will play in. Right now it's just loading a normal new window.

    Any help would be GREATLY appreciated.

    Thanks,
    Loredana
    Last edited by acoder; Nov 1 '08, 11:20 AM. Reason: Added [code] tags
  • AricC
    Recognized Expert Top Contributor
    • Oct 2006
    • 1885

    #2
    Here is an example. Basically you want javascript to open a new window with your flash code.

    Comment

    • milododds
      New Member
      • Oct 2008
      • 1

      #3
      I am facing the same issues and I am trying to implement a solution that I discovered at pipwerks website. So far I am still struggling but what you do is set a value on a click box as a variable and then read that variable into a javascript function. So far I have gotten simple examples to work but I am running into issues with the complex Adobe Javascript in their webpage failing in IE. Here is the main function and then inside of Captivate just set identify"mario" to one button and then a different launch window button set to indetify"luigi" you can call the variable whatever you want, I just kept the example name the same.

      Code:
      function identify(person){
      	
      	var feedback = document.getElementById("feedback");
      	switch(person){
      		case "[B]mario[/B]" : {window.open("index.html","UDDI Web Services Course","menubar=no,address=no,location=no,resizeable=no,toolbar=no,scrollbars=no,directories=no,width=1024,height=825");}
      		break;
      		case "[B]luigi[/B]" : {window.open("navigation.html","Course Navigation","menubar=no,location=no,resizeable=no,toolbar=no,scrollbars=no,address=no,directories=no,width=1024,height=825");}
      		break;
      	}
      Last edited by acoder; Nov 1 '08, 11:20 AM. Reason: Added [code] tags

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Show an example of code which fails, i.e. more of the code including HTML.

        PS. welcome to Bytes!

        Comment

        Working...