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

demo contextmenu line 174 char 2 syntax error


Poster: EdwardCroft
Dated: Saturday April 22 2006 - 14:25:13 BST

Recently I have downloaded your right click context menu demo page, but I can’t get it to work on my machine. However it works fine when I try it on your website.
I have searched topics and have noticed that ie6 sp2 is a bit of an issue and that is the browser I am using. I have tried putting a menu in that is always active as suggested in another post and putting it in the shared folder and accessing from my network places (to stop windows from blocking javascript) I don’t have access to a web server at present I am only making a ‘what could be possible’ presentation.

The error I am getting as described in subject is;

Line 174
Char 2
Error syntax error
Code 0
Ulr file//c:\pathtofile\index.htm

Please help.


Poster: Migru
Dated: Saturday April 22 2006 - 18:25:10 BST

Hi

I´m using the "right click" context menu, cannot confirm any error, using IE and FF and got it to work, taking it from the demo page.
I´m sorry your description of an error is not sufficient to provide any help. What is needed is the entire pages code and of course - the js files.

Michael


Poster: Ruth
Dated: Sunday April 23 2006 - 20:49:46 BST

Hi,

Are you talking about the Dynamic Right-Click Context Demo?

Make sure the milonic menu files are up to date, that they are in the same folder, unless you changed the calls. And, also make sure you have downloaded the newest contextmenu.js module and have that in the folder also.

Ruth


Poster: EdwardCroft
Dated: Saturday April 29 2006 - 14:43:45 BST

Hello again and thanks for replies.

Ok the demo was from http://www.milonic.com/menusample27.php (not sure if its dynamic) and all I did was download the sample, so all the code is exactly the same.
I did download the contextmenu.js from the original page and put it in the folder that contains all other pages and js files, inside it reads:
Milonic DHTML Menu Context/Right Click Menu Module contextmenu.js version 1.2 - September 1st 2004

if this is the newest I don’t know. If it isn’t where is the newest?

I will try it on my brothers computer…. Same problem.

I even tried to host it on msn
[edit] removed link [/edit]


Poster: Migru
Dated: Saturday April 29 2006 - 16:12:41 BST

Hi

the demo doesn´t work it seems. Downloaded, unzipped and run the indexfile - and did not work !! Don´t have the time to investigate the code, it seems it is the menu_data.js...

Michael


Poster: Ruth
Dated: Saturday April 29 2006 - 21:40:13 BST

Hi,

Try this as your menu_data.js file:

Code:
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;




with(contextStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="arial, verdana, tahoma";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#4F8EB6";
headerborder=1;
headercolor="#ffffff";
offbgcolor="#ffffff";
offcolor="#000000";
onbgcolor="#ECF4F9";
onborder="1px solid #316AC5";
oncolor="#000000";
outfilter="randomdissolve(duration=0.4)";
overfilter="Fade(duration=0.2);Shadow(color=#777777', Direction=135, Strength=3)";
padding=3;
pagebgcolor="#eeeeee";
pageborder="1px solid #ffffff";
pageimage="/menuimages/db_red.gif";
separatorcolor="#999999";
subimage="/menuimages/black_13x13_greyboxed.gif";
}

with(milonic=new menuname("contextMenu")){
margin=3;
style=contextStyle;
top="offset=2";
aI("image=/menuimages/home.gif;text=Milonic Home Page;url=/;");
aI("image=/menuimages/print.gif;separatorsize=1;text=Print;url=javascript:window.print();");
aI("image=/menuimages/back.gif;text=Back;url=javascript:history.go(-1);");
aI("image=/menuimages/forward.gif;text=Forward;url=javascript:history.go(1);");
aI("image=/menuimages/browser.gif;text=Refresh;url=javascript:history.go(0);");
aI("separatorsize=1;text=View Page Source;url=javascript:Vsrc();");
aI("showmenu=Context Menu Samples;text=Menu samples;");
aI("text=Disable This Menu;url=`javascript:var contextDisabled=true;");
}

with(milonic=new menuname("Context Menu Samples")){
itemwidth=227;
margin=3;
overflow="scroll";
style=contextStyle;
aI("text=Plain Text Horizontal Style DHTML Menu Bar;url=http://www.milonic.com/menusample1.php;tooltip=The most common of menu samples. This<br>sample allows for vertical pulldown menus<br>to appear from a horizontal main menu;")
aI("text=Vertical Plain Text Menu;url=http://www.milonic.com/menusample2.php;tooltip=Another common sample This time, the sub<br>menus are opened from a vertical main menu ;")
aI("text=All Horizontal Menus;url=http://www.milonic.com/menusample25.php;tooltip=If space is limited, this menu sample shows how<br>to open sub-menus in a horizontal orientation ;")
aI("text=Using The Popup Menu Function Positioned by Images;url=http://www.milonic.com/menusample24.php;tooltip=The popup function can also open menus<br>based on mouse action but also positioned<br>relative to an image ;")
aI("text=Classic XP Style Menu;url=http://www.milonic.com/menusample82.php;")
aI("text=XP Style;url=http://www.milonic.com/menusample86.php;")
aI("text=XP Taskbar Style Menu;url=http://www.milonic.com/menusample83.php;")
aI("text=Office XP Style Menu;url=http://www.milonic.com/menusample47.php;")
aI("text=Office 2003 Style Menu;url=http://www.milonic.com/menusample46.php;")
aI("text=Apple Mac Style Menu;url=http://www.milonic.com/menusample72.php;")
aI("text=Amazon Style Tab Menu;url=http://www.milonic.com/menusample74.php;")
aI("text=Milonic Home Menu;url=http://www.milonic.com/menusample78.php;")
aI("text=Windows 98 Style Menu;url=http://www.milonic.com/menusample13.php;tooltip=The Microfost Windows 98 3D look & feel can be<br>acheived by adding high and low 3D colors to<br>your menu styles ;")
aI("text=Multiple Styles Menu;url=http://www.milonic.com/menusample5.php;tooltip=Demonstrating how to declare properties using different<br>menu styles. Separate styles can be declared for each<br>menu ora style can be used globally for every menu ;")
aI("text=Multi Colored Menu Items;url=http://www.milonic.com/menusample80.php;")
aI("text=Multi Colored Menus Using Styles;url=http://www.milonic.com/menusample7.php;tooltip= ;")
aI("text=Multi Tab;url=http://www.milonic.com/menusample50.php;")
aI("text=Tab Top;url=http://www.milonic.com/menusample52.php;")
aI("text=Multi Columns;url=http://www.milonic.com/menusample73.php;")
aI("text=100% Width Span Menu;url=http://www.milonic.com/menusample26.php;tooltip=Spanning the menu to 100% of the browser width<br>will allow for the menu to become a page separator ;")
aI("text=Follow Scrolling Style Menu;url=http://www.milonic.com/menusample10.php;tooltip=Keeping the menu available at all times no matter<br>where your user has scrolled to, can be acheived by<br>setting the followscroll property for your main menu ;")
aI("text=Menu Positioning With Offsets;url=http://www.milonic.com/menusample23.php;tooltip=Setting the position of menus using screenposition<br>is a handy way of ensuring that your menus will<br>always be centered or positioned exactly how<br>you need ;")
aI("text=Table Based (Relative) Menus;url=http://www.milonic.com/menusample9.php;tooltip=Positioning menus relative to your web pages<br>flow can be acheived by setting the menu style<br>property position to relative ;")
aI("text=Opening Windows and Frames with the Menu;url=http://www.milonic.com/menusample11.php;tooltip=Opening links in other windows or other frames<br>is easy by using the target menu item property. ;")
aI("text=Menus Over Form Selects, Flash and Java Applets;url=http://www.milonic.com/menusample14.php;tooltip=Older browsers have a problem with form objects<br>and other HTML objects that naturally sit higher in<br>the browser layer hiding the menu.<br>The workaround fr this is to use DIV hiding ;")
aI("text=Activating Functions on Mouseover;url=http://www.milonic.com/menusample15.php;tooltip=onfunction, offfunction and clickfunction are<br>built in features that allow you to add<br>custom JavaScript to several menu events ;")
aI("text=Drag Drop Menus;url=http://www.milonic.com/menusample22.php;tooltip=By setting your menus type to be <b>draggable</b><br>this will allow for your users to move<br>main menus by drag and drop ;")
aI("text=Menus with Header Type Items;url=http://www.milonic.com/menusample8.php;tooltip=If you need to separate blocks of menu items within<br>a single menu, Headers are a handy way of<br>segragating your menu items ;")
aI("text=Right To Left Openstyle;url=http://www.milonic.com/menusample65.php;")
aI("text=Up Openstyle Featuring Headers;url=http://www.milonic.com/menusample33.php;")
aI("text=DHTML Menus and Tooltips;url=http://www.milonic.com/menusample6.php;tooltip=Tooltips are a handy way of adding more information<br>informing the user how to navigate your website or<br>use your application incorporating the menu ;")
aI("text=Unlimited Level Menus Example;url=http://www.milonic.com/menusample67.php;")
aI("text=Context Right Click Menu;url=http://www.milonic.com/menusample27.php;tooltip=Context menus are easily configured with the<br>Milonic DHTML Menu. No special requirements are needed<br>Except for a small custom JavaScript module ;")
aI("text=Menus built entirely from images;url=http://www.milonic.com/menusample18.php;tooltip=If you prefer to build your menus completely<br>from images this is easily possible, let<br>the menu take care of your images. ;")
aI("text=Static Images Sample;url=http://www.milonic.com/menusample16.php;tooltip=Inserting images inside menus is made easy<br>with the use of the image property for menu items ;")
aI("text=Rollover Swap Images Sample;url=http://www.milonic.com/menusample17.php;tooltip=Swaping images on mouse over can be acheived<br>by setting the image and onimage properties<br>for your menu items ;")
aI("text=Background Item Images;url=http://www.milonic.com/menusample20.php;tooltip=Each menu item can have its own background image.<br>Text can be overlaid meaning you only need to build<br>and download one image ;")
aI("text=Background Image Buttons;url=http://www.milonic.com/menusample89.php;")
aI("text=Menu Background Images;url=http://www.milonic.com/menusample76.php;")
aI("text=Creating Texture with Menu Background Images;url=http://www.milonic.com/menusample19.php;tooltip=Adding a background image to your menus can<br> vastly improve the apperance of otherwise dull<br>backgrounds. ;")
aI("text=Static Background Item Images;url=http://www.milonic.com/menusample71.php;")
aI("text=Vertical Static Background Item Images;url=http://www.milonic.com/menusample87.php;")
aI("text=World Map Sample;url=http://www.milonic.com/menusample92.php;")
aI("text=US Map Sample;url=http://www.milonic.com/menusample91.php;")
aI("text=Image Map Sample;url=http://www.milonic.com/menusample4.php;tooltip=Image maps can be used to open menus using the popup<br>function based on the HTML object AREA ;")
aI("text=Rounded Edges Imperial Style;url=http://www.milonic.com/menusample21.php;tooltip=Including rounded edges to menus ;")
aI("text=Corporation;url=http://www.milonic.com/menusample40.php;")
aI("text=International;url=http://www.milonic.com/menusample70.php;")
aI("text=Clean;url=http://www.milonic.com/menusample32.php;")
aI("text=3D Gradient Block;url=http://www.milonic.com/menusample57.php;")
aI("text=Descreet;url=http://www.milonic.com/menusample42.php;")
aI("text=Agriculture;url=http://www.milonic.com/menusample41.php;")
aI("text=Breeze;url=http://www.milonic.com/menusample29.php;")
aI("text=Chart;url=http://www.milonic.com/menusample66.php;")
aI("text=Cartoon;url=http://www.milonic.com/menusample77.php;")
aI("text=Start Button Menu;url=http://www.milonic.com/menusample69.php;")
aI("text=Tramline;url=http://www.milonic.com/menusample54.php;")

}

drawMenus();


I took this from the menusample27 page where the menu is working. I think there's something wrong in the download sample menu_data.js file.

Save the above as test_data.js and put it where you have the other files for this and call it instead of the menu_data.js file and see if it works. If it does just use that instead of the downloaded menu_data.js file.

I'll report the problem to Andy.

Ruth


Poster: EdwardCroft
Dated: Sunday April 30 2006 - 16:41:43 BST

Fantastic thank you =)

there is an extra () in the file take them out from the very end and it all fine.