Comment or Rem out lines of code?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Comment or Rem out lines of code?

Post by rudy »

One of the buttons on my menu has several drop down links that I don't want. I just want the button to be active and no drop down links.

How do I rem or comment out the lines of code I don't want without having to remove the line.

Is it a double forward slash // in front of the line?

Please help
User avatar
fredlongworthhighschool
Mega Advanced
Mega Advanced
Posts: 362
Joined: Fri Jun 27, 2003 11:34 am
Location: Manchester, England.
Contact:

Post by fredlongworthhighschool »

Yes, just add the double slash and a space and it will ignore that line. Very useful for temporilly removing options you may need again in the future.
Andy Davis
Web Designer & Smartboard Manager

Fred Longworth High School, Manchester, England.
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

My two cents:

A space after the // is nice for formatted comments that you want in the code for documentation, but it's not really necessary.

Code: Select all

//this line is treated as a comment
Leaving the space out when you're just testing things will save a little editing time. Last thing FYI... for multi-line comments, use the /*comments*/ approach:

Code: Select all

/*
Here are a couple
of lines of comments
*/
Kevin
Post Reply