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:50

inserting explanation type info in file

Poster: Ruth
Dated: Thursday January 1 2004 - 18:20:57 GMT

I remember in version 3 the file had all kinds of info next to various things with // and such. Is it possible to do that in the new menu? I just need to have info there for my memory of what I did with certain things and why....not sure how to do that or if it's possible. Happy New Year, everyone.


Poster: Maz
Dated: Thursday January 1 2004 - 23:21:46 GMT

Happy New Year Ruth!

I think you will be okay with //

I'm not having problems with it anymore.


Poster: Ruth
Dated: Friday January 2 2004 - 16:33:02 GMT

Thanks Maz, worked perfectly.


Poster: kevin3442
Dated: Friday January 2 2004 - 16:43:56 GMT

Hi Ruth and Maz,

Just to add... the explanations are held in "comments." Most programming/scripting languages offer the ability to add comments to the code, for just the reason you mention (remembering later what you did, or helping others to understand what you did). Since the menu code is javascript, you can use javascript's commenting scheme. In javascript, there are two methods of adding comments.

(1) If you want to add a comment on a single line in the .js file, you can use the // method, like so:
var inkeeper9 = "Ruth"; // innkeeper9 is Ruth's on-line name

Everything to the right of the //, on that single line of code is ignored by the browser when it processes that line of js code.

(2) If you want to add a "block" of comments, i.e., more than a single line, you have two choices. Some people would add a // to the start of each line. Alternatively, you could use the /* put your comments here */ construct, like so:
Ruth and Maz both participate quite a lot on the Milonic forums,
asking questions occasionally, and also often answering other
people's questions to "give back" to this very nice on-line
var inkeeper9 = "Ruth";  // innkeeper9 is Ruth's on-line name
var maz = "Maz"; // Don't know what Maz's real name is

Everything between the opening /* and the closing */ is ignored, kind of like using <!-- and --> in html code.