is a ; needed or not?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
pieter53
Super Advanced
Super Advanced
Posts: 44
Joined: Sat Nov 18, 2006 9:49 am
Location: Schoonoord, The Netherlands
Contact:

is a ; needed or not?

Post by pieter53 »

Just a simple question: is the ; at the end of menulines needed or not?

A line like this: aI("showmenu=Services;text=Services;"); ends with ;

But in the Vertical plain text Menu example you can see lines without ; at the end

with(milonic=new menuname("Samples")){
overflow="scroll";
style=menuStyle;
aI("text=Plain Text Horizontal Style DHTML Menu Bar;url=http://milonic.com/menusample1.php;")
aI("text=Vertical Plain Text Menu;url=http://milonic.com/menusample2.php;")
aI("text=All Horizontal Menus;url=http://milonic.com/menusample25.php;")
aI("text=Using The Popup Menu Function Positioned by Images;url=http://milonic.com/menusample24.php;")
aI("text=Classic XP Style Menu;url=http://milonic.com/menusample82.php;")


and lines with ; at the end

with(milonic=new menuname("Milonic")){
style=menuStyle;
aI("text=Product Purchasing Page;url=http://milonic.com/cbuy.php;");
aI("text=Contact Us;url=http://milonic.com/contact.php;");
aI("text=Newsletter Subscription;url=http://milonic.com/newsletter.php;");
aI("text=FAQ;url=http://milonic.com/menufaq.php;");
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

In JavaScript the semi-colon is not a mandatory requirement as long as there is a line feed.

That's why you sometimes see them and sometimes you don't

-- Andy
pieter53
Super Advanced
Super Advanced
Posts: 44
Joined: Sat Nov 18, 2006 9:49 am
Location: Schoonoord, The Netherlands
Contact:

Post by pieter53 »

THANKS!
Post Reply