Horizontal Nav Menu (table bound)?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
viclewis
Super Advanced
Super Advanced
Posts: 43
Joined: Tue Jul 06, 2004 6:19 pm
Location: Sanford, [Sunny]Florida

Horizontal Nav Menu (table bound)?

Post by viclewis »

I have racked my brain trying to get my menu to display in a table. I am using version 5.17 of Milonic table bound nav menu.

I have spent numerous hours studying the Table Bound instructions on example #9.

I have previously made the horizontal Nav menu to display at the top left of a page without any problem.

My url is:http://fbclongwood.org

On left of the home page is the link: Website Testing for the page in question.

The second link is my menu_data.js file link. :(
Victor Lewis
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Victor,

Two things as far as I can tell:

(1) Your menu_data.js file still contains the definition for your "Main Menu". Since you've taken that out of the .js file and placed it into the table in your .htm file, you no longer need it in the menu_data.js file (you don't want two main menus!).

(2) Here's the biggie... You have a javascript syntax error in the Main Menu definition in your .htm file. It's only one little character (easy to do, difficult to find later!), but it's enough to blow the js up. Here's the code containing the error, starting at line 36 of your .htm file:

Code: Select all

aI("text=menu 2;showmenu=Menu 2;"); }
         }
         drawMenus();
You have two closing curly braces (}) at the end of your main menu defintion instead of one. There's one at the end of line 36 and another by itself on line 37. You need to delete one of them (doesn't matter which).

I'd also like to mention that, if your goal is simply to center the menu and keep it centered as the user resizes the window, then there are easier ways to do it than placing it in a table.

Final note: Once you get it going, you might consider backing up your v5.17 files and getting the latest update, v5.32.

Hope that helps,

Kevin
viclewis
Super Advanced
Super Advanced
Posts: 43
Joined: Tue Jul 06, 2004 6:19 pm
Location: Sanford, [Sunny]Florida

My table bound nav menu

Post by viclewis »

I removed the extra closing curly brace and removed and replaced the main menu in my menu_data.js file.

When I removed the main menu from the menu_data.js file it did not make any difference. It still did not display.

I put borders around my tables so they would display.

I haven't a clue how to get this to display.
Victor Lewis
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Vic,

Two problems:

(1) Your page is not loading the .js files. For example, you have

Code: Select all

<SCRIPT language=JavaScript src="/milonic_src.js" type=text/javascript></SCRIPT>
which would tells the browser to look in the site's root directory for the milonic_src.js file; i.e., to look in

Code: Select all

http://www.fbclongwood.org/
But the file isn't there. Same for the other menu files: mmenudom.js, mmenuns4.js, and menu_data.js. I found your menu .js files in

Code: Select all

http://www.fbclongwood.org/Revised Church Website/Nav menu table bound testing/
You'll probaly want to move those four files to the site's root.

(2) You still have a Main Menu defined in your menu_data.js file (you probably put it back after your test). You'll still want to get rid of that.

Hope that helps,

Kevin
viclewis
Super Advanced
Super Advanced
Posts: 43
Joined: Tue Jul 06, 2004 6:19 pm
Location: Sanford, [Sunny]Florida

Post by viclewis »

Well I moved my files to the root folder httpdocs of the server. This is my root folder for uploading any and all files. I have changed the code on my page to look in this directory for those files. I still can not get the menu to display either on my local machine or on the url of http://fbclongwood.org :( :( :cry: :cry:
Victor Lewis
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

This is you body tag? I don't know js, but I think its supposed to be in a script tag. Anyone know?

<body onload="preloadImages();">


and there is no end body tag or end html.

I don't see any milonic src scripts on the page.

You need to copy the milonic-src.js and others into the head of your page for it to work. Take a look at the beginners section of the forum.

That's what I think I'm looking at.

maz
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

You have problems in your paths. If you put in the url

Code: Select all

http://fbclongwood.org/milonic_src.js 
or mmenudom.js or mmenuns4.js in place of the milonic_src.js if the files were there they should download, but instead you get page not found.

You also have some mistakes in the coding

Code: Select all

src="httpdocs/mmenuns4.js> and  src="httpdocs/mmenudom.js>
remove the quote marks in front of httpdocs or if you have to have them then put quote marks after the .js so they close the beginning quote mark.

You might try putting the full url for the paths to the files to test if they really are where you're relative paths are calling them....

I just tested your page on my desktop and the menu showed fine in Netscape 6, 7, Opera 7, Firebird .07 and IE5.5. You need to upgrade to 5.33, you are way down level at 5.17 Make sure you save the 3 files you have now in a separate file until you're sure the new files work. Log in on Milonic main page and download the newest version.

Ruth
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi vic,
viclewis wrote:Well I moved my files to the root folder httpdocs of the server. This is my root folder for uploading any and all files.
That was good... that's what I wanted you to do.
viclewis wrote:I have changed the code on my page to look in this directory for those files.

That was not good ;) ... You didn't need to edit the code for you pages at all because they were already looking for the scripts in the root directory. The httpdocs directory path is sort of "internal" to your web server; the code in your pages should not refer to that directory. In other words, if you refer to an html file, like so:

Code: Select all

href="http://websites.milonic.com/fbclongwood.org/products.html
Then your web server will automatically look in the httpdocs directory of your account. Your domain name from a web user's point of view essentially points at the httpdocs directory inside of your account from your web hosts point of view. Make sense?

Change your page code back to the way you had it, like so:
<SCRIPT language=JavaScript src="/milonic_src.js" type=text/javascript></SCRIPT>
(and etc. for the other menu scripts).

Hope that helps,

Kevin
viclewis
Super Advanced
Super Advanced
Posts: 43
Joined: Tue Jul 06, 2004 6:19 pm
Location: Sanford, [Sunny]Florida

Displaying the navagational menu in a table

Post by viclewis »

I have developed a new html page with my menu and it displays properly in a browser window on my local computer.
I have uploaded it to my server and the menu does not display.
I tried putting the code in both the body and the in the head of the document at different times of course. Still no menu display.
I have the four files, menu_data.js etc. in my root folder of httpdocs With the html file in "Revised Church Website".

I'm having the trouble of my life trying to get this to display on my website.

The url is: http://fbclongwood.org/httpdocs/Revised Church Website/index.html :( :roll:
Victor Lewis
viclewis
Super Advanced
Super Advanced
Posts: 43
Joined: Tue Jul 06, 2004 6:19 pm
Location: Sanford, [Sunny]Florida

Hooray, Hooray, Hooray

Post by viclewis »

I put everything in one folder on my server and now my menu is displaying like it should. In IE 6.0, don't know about any other browsers.


Link:
http://fbclongwood.org/httpdocs/Revised ... index.html


Thanks to all who offerered me help.

You're great folks.
Victor Lewis
Post Reply