Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Using javascript for navigation
Old 07-21-2008, 03:18 PM Using javascript for navigation
Average Talker

Posts: 21
Trades: 0
ok, to my understanding i can use a javascript document as a header for websites and embed the document into each site so I only have to edit the javascript document to edit all the sites. My experience with javascript is small but I have a javascript book, that isnt that helpful with what I'm doing. Here is the coding that is obviously wrong:

Javascript document:
Code:
// JavaScript Document
<SCRIPT LANGUAGE="JavaScript">
document.write("<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>
<!-- 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>
  <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("javascript: "+url);}</script>
</div>
<!-- End of f-source menu code -->"
);
</SCRIPT>

Attempt to embed into a html document:
HTML Code:
<SCRIPT language="Javascript" src="navigation.js"></SCRIPT>
aussiemcgr is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-21-2008, 03:55 PM Re: Using javascript for navigation
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
I recommend you not do this to extend content to multiple pages, as it is an extremely inefficient way of doing so. It would be better to do this on the server, by including files with your language of choice, such as PHP or ASP.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 07-21-2008, 04:51 PM Re: Using javascript for navigation
Average Talker

Posts: 21
Trades: 0
is it possible to do it though
aussiemcgr is offline
Reply With Quote
View Public Profile
 
Old 07-21-2008, 04:55 PM Re: Using javascript for navigation
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Yep, it's possible.

It will of course render the pages TOTALLY invisible to search engines.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-21-2008, 04:58 PM Re: Using javascript for navigation
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
mind you, looking at your code.

No it's NOT possible the way you have it set because your "javascript code" is NOT javascript at all
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-21-2008, 04:59 PM Re: Using javascript for navigation
Average Talker

Posts: 21
Trades: 0
so what, my alt is changing all of my sites to .php and then trying to use my servers extremely unhelpful SSI?
aussiemcgr is offline
Reply With Quote
View Public Profile
 
Old 07-21-2008, 06:33 PM Re: Using javascript for navigation
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
How is SSI unhelpful?

apart from where it seems you are trying to use it incorrectly?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-21-2008, 09:54 PM Re: Using javascript for navigation
Average Talker

Posts: 21
Trades: 0
First of all, to my understanding i need to change all my sites to php because my server only supports .php SSI and doesnt support .htaccess. Thats a big prob cause i really dont know much about php.
aussiemcgr is offline
Reply With Quote
View Public Profile
 
Old 07-22-2008, 04:38 AM Re: Using javascript for navigation
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Are you sure .htaccess is disabled totally or is it selective?

You don't need to know anything about PHP programming to use it just for includes BTW
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Using javascript for navigation
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.62915 seconds with 12 queries