Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:22

Placement of Script files...


Poster: vikenk
Dated: Monday December 12 2005 - 13:29:53 GMT

Hello everyone,

In theory, can I place the menu script files anywhere on the page or must I place it as the first item in <body> ot put in in the <head>?

Ever since I implemented the menu, the home page of the website is taking a long time to load. I first I suspected that it may have something to do with images and JavaScipt since the home page is a little image and script heavy. However, there's nothing different about the page except the menu.

I suspected that it had to do with the 30k size of the mmenudom.js file, which had to be parsed before the rest of the page. So, as an experiment, I moved the menu script files to the last item in the page, just before the body close tag. Now the page initially loads faster. The menu is last to show up, but the user at least has something to see and read until the menu shows up, even though it doesn't take long. The home page was just taking too long to show up, and I have a hi-speed connection!

However, I'm not sure if there's any issue that I don't know about with putting the menu last. Is there anything that I need to know about putting the menu last, So far it seems to operate well. The menu would only be last on the home page, since all the other pages respond much quicker.

Thanks.

Viken K.


Poster: Ruth
Dated: Monday December 12 2005 - 13:41:43 GMT

Hi,

I've seen others place it at the bottom for timing reasons or something. It is recommended that it be immediately after the body tag, and I don't know how putting it at the bottom might affect all browsers.

By the way, I keep getting an error message when the page loads

Code:
Error: runMe is not defined


Ruth


Poster: vikenk
Dated: Monday December 12 2005 - 13:57:20 GMT

Thanks for replying Ruth. I'll try keeping the script files on the bottom and monitor if there are any problems.

Thanks for pointing out the error. Runme() was a body onload command that I used in the left frame of the site to load a scolling news-ticker script. I don't use it anymore and forgot to take it out. This new ticker that I'm using now, called Memory Ticker (a freeware script), is really nice because it remembers where it was when you leave a page and continues from that point when you go back to the page.

Thanks.

Viken K.