Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-2004, 01:38 PM
WebProWorld Pro
 

Join Date: Jan 2004
Location: Empangeni, South Africa
Posts: 124
justinw RepRank 0
Default Scripting menu help...

I have decided to change my site and break out of the frames. But I still want the option of being able to edit the menu look at all times. I have been speaking to one of the Web Developer's with my host company and he suggested I have a .js include file on all my pages.

Now that I all understand and of how to place code in my pages; but I still want to know if I can achieve the same design effect I currently have. If you view my site (www.empangenispca.co.za) and see the menu on the left; that's what I want.

Also: If I do place the menu include; do I have to make it appear in a table - eg: menu in left cell and page content in right cell?

Thanks in advance!
__________________
Website designs in Empangeni, South Africa: www.jwdesigns.co.za
Reply With Quote
  #2 (permalink)  
Old 03-11-2004, 05:00 PM
mikmik's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 3,406
mikmik RepRank 1
Default

Here you go:
http://factor1.net/spca/jsmenu.html

Just place this where you want the menu, in a table cell or wherever, you can play around the alignment, but it is straight forward.

<script type="text/javascript" src="menu.js"></script>

Put in each page.
To update your menu, open 'menu.js' with your text editor, and you will be able to repeat or delete (it rhymes!) what is there.
Just use the "File" menu, and then "Save as"-web page complete to get the page.
__________________
What I am is what I am, are you what you are, or what.
Eddie Brickel
Reply With Quote
  #3 (permalink)  
Old 03-11-2004, 05:19 PM
mikmik's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 3,406
mikmik RepRank 1
Default

I guess I should tell you what I did, so you can do it anytime!

Quote:
<div style="margin: 1px; width: 140;" align="center">
<div class="menu">Home</div>
<div class="menu">About Us</div>
<div class="menu">Animal Care</div>
<div class="menu">Branches</div>
<div class="menu">Can You Help?</div>
<div class="menu">Guestbook</div>
<div class="menu">News</div>
<div class="menu">Objectives</div>
<div class="menu">Tariffs</div>
<div class="menu">Toby's Fund</div>
<div class="menu">Contact Us</div>
</div>
</body>
(I had to add an 'x' to the 'a' to get this to render properly in this post!)
All the code in red gets replaced by the "menu.js" include.

To make the include, I just copied all the red stuff, went to Google, and searched for 'html to javascript convert'.
I went to the first one that returned in the search - then just pasted the html code into the box and clicked 'generate'.
Then I copied and pasted that code into a .txt document(with notepad) and saved as "menu.js".

Don't forget to change the "TARGET="RIGHT"" in the menu.js if you change from frames to a single page!
__________________
What I am is what I am, are you what you are, or what.
Eddie Brickel
Reply With Quote
  #4 (permalink)  
Old 03-13-2004, 07:37 AM
WebProWorld Pro
 

Join Date: Jan 2004
Location: Empangeni, South Africa
Posts: 124
justinw RepRank 0
Default

Thank you very much mikmik!
__________________
Website designs in Empangeni, South Africa: www.jwdesigns.co.za
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , ,



Thread Tools
Display Modes

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

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


Search Engine Optimization by vBSEO 3.2.0