Placing scriptpath in user file rather than in milonic_src

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Marc-Andre.Roberge@mus.ul
Super Advanced
Super Advanced
Posts: 47
Joined: Sun May 19, 2002 7:23 pm
Location: Québec, QC, Canada
Contact:

Placing scriptpath in user file rather than in milonic_src

Post by Marc-Andre.Roberge@mus.ul »

I upgraded a few days ago from RC5 to RC9. It occurred to me that it would be much more simple for the user if one could specify the scriptpath variable in the user-customizable file rather than in milonic_src.js. Having the variable in a file that changes with each upgrade means that one has to update the milonic_src.js file quite often. Having the variable in the user's own file would limit modifications to that file only and would avoid problems connected with editing a file whose content is very sensitive (even if the modification is very easy and should normally not pose problems). The only thing I do not know is whether placing the variable in a file other than milonic_src.js is in fact possible. After all, wouldn't the user's file be the right place for this variable since it is user-customizable?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

My guess would be that variable is tied to that file for a reason. Andy is pretty good about making things as simple as possible for his users. However, I am not a JS expert by any means, so the final say will have to come from the boss.

Regardless, as soon as the final hits the releases will not be coming so quickly, so it won't be such a problem any more.
John
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Having the scriptpath in milonic_src is necessary. The reason being, milonic_src does the sensing of your browser to determine which browser specific menu code it should import. So once it has sensed it, it uses the scriptpath to find where, say mmenudom.js, is located and imports it. Inside of mmenudom are function definitions which are used by your menu_data file extensively. So your menu_data file cannot be run unless milonic_src has found the correct files using the scriptpath, so its necessary.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply