menu not showing online

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
hotrodd3322
Advanced
Advanced
Posts: 14
Joined: Wed Sep 10, 2003 8:28 pm
Location: Los Angeles

menu not showing online

Post by hotrodd3322 »

Hi,
I recently purchased an dhtml menu from your site but am having difficulties publishing it online. It works fine on my desktop but as soon as it gets uploaded it ceases to work. I have it embedded in a table and the javascript files are in the 'menu' folder. What directories do I need to change in the javascript files? I know i need to declare a scriptpath variable and assign it a value of "/menu/", but is that all that needs to be done???
In case I haven't been specific enough the site can be found at http://www.gabrielaartigas.com/alex_restaurant/alex.htm
Any support would be GREATLY appreaciated.
Thank you,
Rod
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

I know you coded as is shown in the examples, but some of us have been having trouble with that. Try this instead...

Move the call to milonic_src.js as the first item after <body>.

Move all the Main Menu code back to menu_data.js.

Put only the call to menu_data.js in the <td> where you just removed the menu code.
John
hotrodd3322
Advanced
Advanced
Posts: 14
Joined: Wed Sep 10, 2003 8:28 pm
Location: Los Angeles

Post by hotrodd3322 »

By "call to milonic_src.js", do you mean this piece of code:
<SCRIPT language=JavaScript src="menu/milonic_src.js" type=text/javascript></SCRIPT>

I'll give that a try in the meantime as I wait for you to get back to me...Thank you,
Rod
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Yes, exactly.

You also might want to consider making your calls 'server relative'; i.e., instead of...

Code: Select all

<SCRIPT language=JavaScript src="menu/milonic_src.js" type=text/javascript></SCRIPT>
...change it to...

Code: Select all

<SCRIPT language=JavaScript src="/menu/milonic_src.js" type=text/javascript></SCRIPT>
Note the / added before menu.

This will allow you to use the same code no matter what the depth (directory levels) of your site. Prevents things like ../menu, ../../menu, etc.
John
hotrodd3322
Advanced
Advanced
Posts: 14
Joined: Wed Sep 10, 2003 8:28 pm
Location: Los Angeles

Post by hotrodd3322 »

I made the recommended changes (including the server relative changes) and eventhough the browser displays the menu on my desktop it, still doesn't show up online!! Thanks for your help and if you come up with any additional tips please do not hesitate to share! Thanks,
Rod
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Sorry. Headache day.

I was just going to correct my error, but I see you got it working.
John
hotrodd3322
Advanced
Advanced
Posts: 14
Joined: Wed Sep 10, 2003 8:28 pm
Location: Los Angeles

Post by hotrodd3322 »

I only got it working because I put all the files in the same directory as alex.htm...Idealy i'd like to put them in a 'menu' folder for an organizational standpoint.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You can still do that when ol' dummy here gets around to giving you the right answer!

Server relative, as the name implies, means making your paths from the server - I cut you one directory short.

So...

scriptpath="/alex_restaurant/menu/";

This assumes /menu/ to be at the same level as alex.htm.

Same would be true for your calls...

<SCRIPT language=JavaScript src="="/alex_restaurant/menu/milonic_src.js" type=text/javascript></SCRIPT>

etc.
John
hotrodd3322
Advanced
Advanced
Posts: 14
Joined: Wed Sep 10, 2003 8:28 pm
Location: Los Angeles

Post by hotrodd3322 »

John you are the man!!!! I know it was a no-brainer for you but it just made my day!
Thanks again,
Rod
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Way to stick with it hotrodd3322 and figure it out using Johns advice. Glad to see you're well on your way.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
hotrodd3322
Advanced
Advanced
Posts: 14
Joined: Wed Sep 10, 2003 8:28 pm
Location: Los Angeles

Post by hotrodd3322 »

thanks quick (and great) support !
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Thanks for the compliment. We're usually quicker (and get it right the first time!), but it's just been one of those days... :?
John
hotrodd3322
Advanced
Advanced
Posts: 14
Joined: Wed Sep 10, 2003 8:28 pm
Location: Los Angeles

Post by hotrodd3322 »

I noticed the submenus don't seem to line up very well on a mac. Is there a solution to that?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Guaranteed it's not the Mac - it's the browser!

Tell me browser and OS.
John
hotrodd3322
Advanced
Advanced
Posts: 14
Joined: Wed Sep 10, 2003 8:28 pm
Location: Los Angeles

Post by hotrodd3322 »

my buddy tested it and he's on mac os x / explorer v5.2..
hotrodd3322
Advanced
Advanced
Posts: 14
Joined: Wed Sep 10, 2003 8:28 pm
Location: Los Angeles

Post by hotrodd3322 »

i can post screenshot's if you'd like.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

In both Safari 1.0 and NS 7.1 they look right on. In IE 5.2.3 (which took a very long time just to open the page) they're all over the place. Will have to do some more digging tomorrow.
John
hotrodd3322
Advanced
Advanced
Posts: 14
Joined: Wed Sep 10, 2003 8:28 pm
Location: Los Angeles

Post by hotrodd3322 »

hmmm...two out of three ain't bad but I don't know if the client will agree! This is my first site with dhtml menus and so far I like how easy it is to organize content. Particularly with indecisive clients that are always adding or removing content. These menus give me the flexability of adding more content with just simple code. I thought the imcompatabilty issues had been taken care of at this point but I guess I'm wrong.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Now that Andy finally has his computer fixed he'll be popping in more often, so don't give up. I took another look but don't see anything popping out at me. Sorry...
John
Post Reply