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

Expected Identifier error


Poster: scrubdaddy
Dated: Friday October 10 2003 - 2:09:23 BST

Cheers all... I'm getting an "Expect Identifier" error on some of my pages and I can't figure it out. There's a chance it's not the menu, but I don't think so at this point. Here's my code if you would please be so kind as to try it out.

Thank you...
-Scott

_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=0 // The time delay before menus open on mouse over
_followSpeed=5 // Follow scrolling speed
_followRate=40 // Follow scrolling Rate
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
_scrollAmount=3 // Only needed for Netscape 4.x
_scrollDelay=20 // Only needed for Netcsape 4.x



with(menuStyle=new mm_style()){
onbgcolor="#E2D8F7";
oncolor="#28006A";
offbgcolor="#28006A";
offcolor="#FFFFFF";
bordercolor="#28006A";
borderstyle="solid";
borderwidth=0;
separatorcolor="#6941AB";
separatorsize="1";
padding=4;
fontsize="75%";
fontstyle="normal";
fontweight="700";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="white";
pagebgcolor="#533388";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="/images/arrow.gif";
subimagepadding="3";
overfilter="Alpha(opacity=90)";
}


with(milonic=new menuname("Main Menu")){
style=menuStyle;
screenposition="center";
top=58;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=/;status=Hollywood Video Home");
aI("text=Store Locator;url=/storelocator/default.aspx;showmenu=Store Locator;status=Store Locator");
aI("text=Movies;url=/movies/default.aspx;showmenu=Movies;status=Movies");
aI("text=Games;url=/games/default.aspx;showmenu=Games;status=Games");
aI("text=Family;url=/family/default.aspx;showmenu=Family;status=Family");
aI("text=Gift Cards;url=/giftcards/default.aspx;showmenu=Gift Cards;status=Gift Cards");
aI("text=Specials;url=/specials/default.aspx;showmenu=Specials;status=Specials");
aI("text=Company;url=/company/default.aspx;showmenu=Company;status=Company");
aI("text=My Hollywood Video;url=/profile/EditProfile.aspx?;showmenu=My Hollywood Video;status=My Hollywood Video");
}

with(milonic=new menuname("Store Locator")){
style=menuStyle;
aI("text=Find a Store Near You;url=/storelocator/default.aspx;status=Store Locator");
}

with(milonic=new menuname("Movies")){
style=menuStyle;
aI("text=Movies Home;url=/movies/default.aspx;status=Movies Home");
aI("text=Now Playing;url=/movies/now_playing.aspx;status=Now Playing");
aI("text=Coming Soon;url=/movies/coming_soon.aspx;status=Coming Soon");
aI("text=New Release Calendar;url=/movies/new_release_calendar.aspx;status=New Release Calendar");
aI("text=Guaranteed In Stock;url=/movies/guaranteed_in_stock.aspx;status=Guaranteed In Stock");
aI("text=The 50 Hottest Rentals;url=/movies/hottest_rentals.aspx;status=The 50 Hottest Rentals");
aI("text=Top Ten Lists;url=/movies/top_ten_lists.aspx;status=Top Ten Lists");
aI("text=This Week's Spotlight;url=/movies/spotlight.aspx;status=This Weeks Spotlight");
}

with(milonic=new menuname("Games")){
style=menuStyle;
aI("text=Games Home;url=/games/default.aspx;status=Games Home");
aI("text=Now Playing;url=/games/now_playing.aspx;status=Now Playing");
aI("text=Coming Soon;url=/games/coming_soon.aspx;status=Coming Soon");
aI("text=Top Ten Rentals;url=/games/top_ten_rentals.aspx;status=Top Ten Rentals");
aI("text=ESRB Game Ratings;url=/games/game_ratings.aspx;status=ESRB Game Ratings");
aI("text=Xbox;url=/games/xbox.aspx;status=Xbox");
aI("text=PS2;url=/games/ps2.aspx;status=PS2");
aI("text=GameCube;url=/games/gamecube.aspx;status=GameCube");
}

with(milonic=new menuname("Family")){
style=menuStyle;
aI("text=Family Home;url=/family/default.aspx;status=Family Home");
aI("text=Movies for Kids;url=/family/kids_movies.aspx;status=Movies for Kids");
}

with(milonic=new menuname("Gift Cards")){
style=menuStyle;
aI("text=Gift Cards Home;url=/giftcards/default.aspx;status=Gift Cards Home");
aI("text=Personal Gifts;url=/offsite.aspx?url=http://www.hollywoodvideogiftcards.com/GiftCard_Consumer.asp;status=Personal Gifts");
aI("text=Business Gifts/Incentives;url=/offsite.aspx?url=http://www.hollywoodvideogiftcards.com/GiftCard_Business.asp;status=Business Gifts");
aI("text=Reload Your Gift Card;url=/offsite.aspx?url=http://www.hollywoodvideogiftcards.com/GiftCard_Reload.asp;status=Reload Your Gift Card");
aI("text=Check Your Gift Card Balance;url=/offsite.aspx?url=http://www.hollywoodvideogiftcards.com/GiftCard_Balance.asp;status=Check Your Gift Card Balance");
aI("text=Nonprofit Gift Card Orders;url=/giftcards/giftcard_nonprofit_intro.aspx;status=Nonprofit Gift Card Orders");
}

with(milonic=new menuname("Specials")){
style=menuStyle;
aI("text=Store Specials Home;url=/specials/default.aspx;status=Store Specials Home");
aI("text=Previously-Viewed Movie Deals;url=/specials/pv_spotlight.aspx;status=Previously-Viewed Movie Deals");
aI("text=Promotional Partnerships;url=/specials/promotional_partnerships.aspx;status=Promotional Partnerships");
}

with(milonic=new menuname("Company")){
style=menuStyle;
aI("text=Company Home;url=/company/default.aspx;status=Company Home");
aI("text=Contact Us;url=/company/contact_us.aspx;status=Contact Us");
aI("text=Frequently Asked Questions;url=/company/frequently_asked_questions.aspx;status=Frequently Asked Questions");
aI("text=Jobs;url=/company/jobs.aspx;status=Jobs");
aI("text=Advertise With Us;url=/company/advertising_opportunities.aspx;status=Advertising Opportunities");
aI("text=Our Advertising;url=/company/advertising.aspx;status=Our Advertising");
aI("text=Investor Information;showmenu=Investors;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-irhome;status=Investor Information");
aI("text=Community Programs;url=/company/community_spotlight.aspx;status=Our Community Spotlight Program");
}

with(milonic=new menuname("Investors")){
style=menuStyle;
aI("text=Investor Overview;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-irhome;status=Investor Overview");
aI("text=Analyst Coverage;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-analysts;status=Analyst Coverage");
aI("text=Corporate Governance;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-govHighlights;status=Corporate Governance");
aI("text=Event Calendar;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-calendar;status=Event Calendar");
aI("text=E-mail Alerts;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-alerts;status=E-mail Alerts");
aI("text=Earning Estimates;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-estimates;status=E-mail Alerts");
aI("text=Historical Price Lookup;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-stockLookup;status=Historical Price Lookup");
aI("text=Information Request;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-info;status=Information Request");
aI("text=Management & Board;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-governance;status=Management and Board");
aI("text=News Releases;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-news;status=News Releases");
aI("text=SEC Filings;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-sec;status=SEC Filings");
aI("text=Stock Chart;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-stockChart;status=Stock Chart");
aI("text=Stock Quote;url=/offsite.aspx?url=http://ir.hollywoodvideo.com/phoenix.zhtml?c=69069&p=irol-stockQuote;status=Stock Quote");
}

with(milonic=new menuname("My Hollywood Video")){
style=menuStyle;
aI("text=My Wish List;url=/myhollywood/wishlist.aspx?;status=My Wishlist");
aI("text=Modify My Account;url=/profile/EditProfile.aspx;status=Modify My Account");
aI("text=Sign In;url=/profile/default.aspx?;status=Sign In");
aI("text=Create New Account;url=/profile/default.aspx?;status=Create New Account");
aI("text=Newsletters;url=/profile/default.aspx?promo=news001;status=Receive our Newsletters");
aI("text=Help;url=/myhollywood/help.aspx;status=Help");
}

drawMenus();


Poster: scrubdaddy
Dated: Friday October 10 2003 - 2:11:45 BST

Oh... I meant Expected Identifier, and actually I get four errors (if you click the 'previous' button in the IE script error dialog box.

Thanks...


Poster: Hergio
Dated: Friday October 10 2003 - 2:31:19 BST

Took your code and threw it into my dev server and it worked like a charm. You have your milonic_src.js, mmenudom, and mmenuns4.js files updated and saved to the correct directories and you are referencing them correctly from your page, right?


Poster: scrubdaddy
Dated: Friday October 10 2003 - 2:35:00 BST

Thanks Dave... I have all the js files like so:

root/include/js/*.js

Odd thing is, I don't receive this error on my home page... which makes me think it could be a folder issue as my homepage is in the root as:

root/default.aspx

Additionally, though, the Store Locator page works, as does the My Hollywood default page. The errors only occur for movies, games, family, gift cards, company.

Thoughts?


Poster: John
Dated: Friday October 10 2003 - 2:55:25 BST

Got a URL where we can see what's happening?


Poster: scrubdaddy
Dated: Friday October 10 2003 - 2:57:59 BST

Unfortunately (in this case) we're firewalled on a dev box. I can't send it out... :?

I've got three guys in debug mode on it in Visual Studio... I'm tapped for ideas at this point and have passed the buck to them for now (and you all here at Milonic!)


Poster: Hergio
Dated: Friday October 10 2003 - 14:16:15 BST

Does the Milonic menu actually show up and work ok in those pages?

For some reason I am thinking a path issue. All those pages you mentioned are in their own directories away from the root, so if its working in some but not others, it sounds like a targetting problem. You using the same includes on all the pages? You using absolute urls in those includes to make your life easier? Also do you have all the latest releases of all the files?

If you're good on all that and it still has errors, since this is a dev box, throw up a very simple menu (like one from the samples) into some of your pages and see if you get the errors. You may have something oddly buggy in your menu_data that I am not seeing.


Poster: scrubdaddy
Dated: Friday October 10 2003 - 22:32:48 BST

We found the problem! Since we're using .net, the forms on the pages that weren't working were not named individually. For some reason this created the conflict, so happy to say it wasn't the menu's fault, but if other .net coders have this problem, they might look at trying this solution.

Thanks for the help... you got me going down the correct path.

-Scott


Poster: Hergio
Dated: Tuesday October 14 2003 - 3:34:38 BST

So what you are saying is the form object in the .NET pages did not have an ID set and that was causing problems? Are you using VS.NET or just a simple editor because I thought VS automatically named them for you.

BTW, thats a great fix, nice job picking that up. I am sure we will run into it again as .NET becomes more mainstream.