Help - Search - Members - Calendar
Full Version: Javascript And Flash
Zymic Webmaster Forums > Web Design & Development > General Web Design Discussion
aussiemcgr
I'm trying to use Javascript instead of SSI for the headers of each page in my website. I have two objects in my header, both being flash objects (welcome message and drop-down menu). I have very minimal experience with Javascript so I would like to know how I go about doing this.
Welcome message code
CODE
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100%" height="75">
  <param name="movie" value="../Welcomemovie.swf" />
  <param name="quality" value="high" /><param name="LOOP" value="false" />
  <embed src="../Welcomemovie.swf" width="100%" height="75" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>


Drop-down Menu
CODE
<!-- f-source menu navigation settings (search engine friendly) -->
<!-- Change these links and press F12 to test -->
<div id='menu' style='position:absolute; visibility:hidden;'>
  <div><a href='../index.php'>Homepage</a></div>
  <div class='submenu' style='color:#FFFFFF; background:#ED8B8B; border:#995A57;'>
  </div>
  <div><a href="../index.php">Community</a></div>
  <div class='submenu' style='color:#FFFFFF; background:#ED8B8B; border:#995A57;'>
    <div><a href='http://f-source.com'>Chatroom</a></div>
    <div><a href='http://f-source.com'>Forum</a></div>
    <div><a href='http://f-source.com'>Fantasy Football</a></div>
  </div>
  <div><a href="../index.php">Team</a></div>
  <div class='submenu' style='color:#FFFFFF; background:#9DC6B8; border:#496D6A;'>
    <div><a href='http://f-source.com'>Roster</a></div>
    <div><a href='../url to pass to JSF' target='callJSF'>Schedule</a></div>
  </div>
  <div><a href='http://f-source.com'>Offseason</a></div>
  <div class='submenu'>
    <div><a href='http://f-source.com'>Draft Information</a></div>
    <div><a href='http://f-source.com'>Superbowl</a></div>
  </div>
</div>
<div id="f-source-menu" style="position:relative;">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="62" >
    <param name="flash_component" value="fsmenuAdobeFree.swc" />
    <param name="movie" value="../menu1.swf" />
    <param name="quality" value="high" />
    <param name="FlashVars" value="flashlet={_searchFieldWidth:120,_subMenuColor:#f7f7f7,_subHighlightColor:#A0A0A0,_searchHighlightColor:#74F044,_TransparencyShadow:100,_showSearchField:false,mainSoundURL:'None',_subFont:'Arial',_menuColor:#DEDEDE,_dividerColor:#CCCCCC,clickSoundURL:'None',_TransparencyMain:100,stretch_width_to:'0px',_subButtonText:#555555,_searchField:#ffffff,_mainFontSize:12,subSoundURL:'None',_mainButtonText:#555556,_textHighlight:#990000,_subHeight:23,bg_Pic_URL:'None',_searchInputTextColor:#000000,_mainHeight:36,_mainFont:'Arial',_mainButWidthExt:1,_TransparencySub:90,xml_Path:'None',_subFontSize:11,_subBorderColor:#C6C6C6}" />
    <param name="wmode" value="transparent" />
  </object>
  &lt;script type="text/javascript">var connected; if (connected){ Run_f_source_menu() }else{ alert("The page is not connected with script file ActiveContentDropDown2.js") };function JSF(url){alert("java script: "+url);}</script>
</div>
<!-- End of f-source menu code -->


Andrew
Can I ask why you hate php? I mean with php this is so simple, a line of PHP at the beginning and end of each page and boom, template system.
aussiemcgr
Because
1) I have absolutely no experience with php
2) i have about 7 pages on my site all using html and I do not want to change all those to php for php SSI to work
Andrew
Thats why replace all is handy smile.gif

But I can understand your annoyance. I just think PHP is wonderful once you get to know it.

And PHP and SSI are completely different things. And your pages aren't html, they are shtml.

Now that I re-read your posts, there is no "converting" html to php, you just add php inside their own blocks like <?php and ?>
You just have to change your file extension to .php so that the server knows to parse it. All your other HTML stays the same.
aussiemcgr
ok, thats great and all, but I want to try and do this in javascript if its possible.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.