Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorcyberjo50
    • CommentTimeJan 9th 2007
     permalink
    Im trying to generate a javascript(generates a flash object script) line inside my html using PHP code. A lil crazy huh..

    Here's the code that im ttrying to change:
    ------------------------------------------------------------------------------------------
    <?
    function buildHeader( $section ) {
    echo ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="747" height="100" id="../deploy/internal_header" align="middle">');
    echo ('<param name="allowScriptAccess" value="sameDomain" />');
    echo('<param name="FlashVars" value="section='.$section.'"/>');
    echo ('<param name="movie" value="internal_header.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#080d3a" /><embed flashVars="section='.$section.'" src="internal_header.swf" quality="high" bgcolor="#080d3a" width="747" height="100" name="../deploy/internal_header" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
    echo ('</object>');
    }
    ?>
    ------------------------------------------------------------------------------------------
    to this:(this is what im trying to make it to work):
    -------------------------------------------------------
    <?
    function buildHeader( $section ) {
    echo ('<script type="text/javascript">');
    echo ('var fo = new FlashObject("internal_header.swf", "index", "747", "100", "6,7,8", "#080d3a");');
    echo ('fo.addParam("quality", "high");');
    echo ('fo.addParam("scale", "noscale");');
    echo ('fo.addParam("align", "middle");');
    echo ('fo.write("index");');
    echo ('</script>');
    }
    ?>
    -------------------------------------------------------
    Anyone knows how to edit the last code to work as the above code's function?
    thanks in advance.
    • CommentAuthorYakuzza
    • CommentTimeJan 9th 2007 edited
     permalink
    why don't you use sessions and the include("myscript.php") command. So you're able to include any script of your choice and feed it with the variables you need (GET, POST).
    •  
      CommentAuthorcyberjo50
    • CommentTimeJan 15th 2007
     permalink
    tnx
Add your comments
    Username Password
  • Format comments as (Help)