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

Page errors


Poster: Maz
Dated: Friday August 22 2003 - 19:09:39 BST

Please can you help me, could it be I'm making the same mistake twice I get the same js error in both menus.
Thank you
maz

This is xtopmenu.js

Line 45, character 1784 object expected
http://mercuryexposure.org/index.php?m=show_doc&pid=13

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

with(XPMainStyle=new mm_style()){
onbgcolor="#FFFFFF";
oncolor="#FF0033";
offbgcolor="#6699FF";
offcolor="#FFFFFF";
headercolor="#FFFFFF";
headerbgcolor="#6699FF";
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=1;
separatorcolor="#FFFFFF";
separatorsize="1";
padding=3;
fontsize="95%";
fontfamily="Tahoma,Arial,Verdana";
subimage="http://mercuryexposure.org/template/main/images/xarrowdn.gif";
subimagepadding="5";
subimageposition="left";
pagecolor="#FF0033";
pagebgcolor="#FFFFFF";
}
with(XPMenuStyle=new mm_style()){
onbgcolor="#FFFFFF";
oncolor="#FF0033";
offbgcolor="transparent";
offcolor="#6699FF";
headercolor="#FFFFFF";
headerbgcolor="#6699FF";
bordercolor="#777777";
borderstyle="solid";
borderwidth=1;
separatorcolor="#EEEEEE";
separatorsize=1;
padding=3;
high3dcolor="#FFFFFF";
low3dcolor="#002266";
subimage="http://mercuryexposure.org/template/main/images/xarrow.gif";
subimagepadding="3";
padding=3;
fontsize="95%";
fontfamily="Tahoma,Arial,Verdana";
image="http://mercuryexposure.org/template/main/images/xblank.gif";
pagecolor="#FF0033";
pagebgcolor="#FFFFFF";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}
with(milonic=new menuname("Main Menu")){
style=XPMainStyle;
top=50;
left=0;
itemheight=20;
alwaysvisible=1;
orientation="horizontal";
keepalive=1;
aI("itemwidth=19;image=http://mercuryexposure.org/template/main/images/xpixel.gif;alt=Skip menu;type=header;separatorcolor=#6699FF;url='';");
aI("itemwidth=78;text= Home Page;url=http://mercuryexposure.org/?m=show_doc&pid=1;title=Home page;");
aI("itemwidth=90;text=About Us;showmenu=organization;title=Mercury Exposure;");
aI("itemwidth=90;text=Experience;showmenu=experience;title=Experience;");
aI("itemwidth=90;text=Research;showmenu=research;title=Research;");
aI("itemwidth=90;text=Resources;showmenu=resources;title=Resources;");
aI("itemwidth=90;text=Legislation;showmenu=legislation;separatorcolor=#6699FF;title=Legislation;");
aI("text= itemwidth=150;type=header;");
}
with(milonic=new menuname("organization")){
style=XPMenuStyle;
bgimage="http://mercuryexposure.org/template/main/images/xwinxp.gif";
overflow="scroll";
itemwidth=90;
aI("text=Organization;url=http://mercuryexposure.org/?m=show_doc&pid=3;title=Organization;");
aI("text=Policy and disclaimer;url=http://mercuryexposure.org/?m=show_doc&pid=7;title=Policy and disclaimer;");
aI("text=Support;url=http://mercuryexposure.org/?m=show_doc&pid=43;title=Support;");
aI("text=Donors;url=http://mercuryexposure.org/?m=show_doc&pid=8;title=Donors;");
aI("text=Sponsors;url=http://mercuryexposure.org/?m=show_doc&pid=10;title=Sponsors;");
aI("text=Volunteers;url=http://mercuryexposure.org/?m=show_doc&pid=27;title=Volunteers;");
aI("text=Canary Production;url=http://mercuryexposure.org/?m=show_doc&pid=30;title=Canary Production;");   
aI("text=Guest Book;url=http://mercuryexposure.org/guestbook.php;title=Guest Book;");
aI("text=Send email;url=help __at__ mercuryexposure.org?Subject=Site%20Visitor;title=Send email;");
}
with(milonic=new menuname("experience")){
style=XPMenuStyle;
bgimage="http://mercuryexposure.org/template/main/images/xwinxp.gif";
itemwidth=90;
aI("text=Personal Story;url=http://mercuryexposure.org/experience.php;title=Personal Story;");
aI("text=Autism;url=http://mercuryexposure.org/autism.php;title=Autism;");
aI("text=Dentistry;url=http://mercuryexposure.org/?m=show_doc&pid=41;title=Dentistry;");
aI("text=Health;url=http://mercuryexposure.org/?m=show_doc&pid=42;title=Health;");
}
with(milonic=new menuname("research")){
style=XPMenuStyle;
bgimage="http://mercuryexposure.org/template/main/images/xwinxp.gif";
itemwidth=90;
aI("text=Science;url=http://mercuryexposure.org/science.php;title=Science;");
aI("text=History;url=http://mercuryexposure.org/history.php;title=History;");
aI("text=Library;url=http://mercuryexposure.org/library.php;title=Library;");
aI("text=News;url=http://mercuryexposure.org/news.php;title=News;");
aI("text=Source;url=http://mercuryexposure.org/?m=show_doc&pid=29;title=Source;");
aI("text=Symptoms;url=http://mercuryexposure.org/symptoms.php;title=Symptoms;");
}
with(milonic=new menuname("resources")){
style=XPMenuStyle;
bgimage="http://mercuryexposure.org/template/main/images/xwinxp.gif";
itemwidth=90;
aI("text=Dentists;url=http://mercuryexposure.org/dentists.php;title=Dentists;");
aI("text=Doctors;url=http://mercuryexposure.org/doctors.php;title=Doctors;");
aI("text=Diagnostics;url=http://mercuryexposure.org/diagnostics;title=Diagnostics;");
aI("text=Lawyers;url=http://mercuryexposure.org/lawyers.php;title=Lawyers;");
aI("text=Organizations;url=http://mercuryexposure.org/organizations.php;title=Organizations;");
aI("text=Products;url=http://mercuryexposure.org/products.php;title=Products;");
}
with(milonic=new menuname("legislation")){
style=XPMenuStyle;
bgimage="http://mercuryexposure.org/template/main/images/xwinxp.gif";itemwidth=90;
aI("text=Global Policy;url=http://mercuryexposure.org/globalpolicy.php;title=Global Policy;");
aI("text=US Policy;url=http://mercuryexposure.org/?m=show_doc&pid=28;title=US Policy;");
aI("text=Letters;url=http://mercuryexposure.org/letters.php;title=Letters;");
}
drawMenus();


Poster: Hergio
Dated: Friday August 22 2003 - 20:35:05 BST

You have duplicate style names and duplicate menu names across the menus. Make sure all your styles have different names...and also both your top most menus have the name 'Main Menu', change them so no menus have the same name. Start with that.... :)


Poster: Maz
Dated: Friday August 22 2003 - 21:26:53 BST

I made these changes:

Code:
with(XPMainTopStyle=new mm_style()){
with(XPTopStyle=new mm_style()){

with(milonic=new menuname("TOP MENU")){
style=XPMainTopStyle;

with(milonic=new menuname("organization")){
style=XPTopStyle;   
................................repeated on submenus

with(XPMainToolStyle=new mm_style()){
with(XPToolStyle=new mm_style()){

with(milonic=new menuname("TOOLS MENU")){
style=XPMainToolStyle;

with(milonic=new menuname("disease")){
style=XPToolStyle;
.................................repeated on submenus


Still works locally.
Thankyou
maz


Poster: John
Dated: Friday August 22 2003 - 21:38:11 BST

You have this in your Main Menu...
Code:
aI("text= itemwidth=150;type=header;");

Should be...
Code:
aI("text= ;itemwidth=150;type=header;");

You're missing the ; after the text item.


Poster: Maz
Dated: Friday August 22 2003 - 21:59:52 BST

My silly mistake when I posted and edited the space :oops:
...after playing with 100%

Still no change.

I've tried both of these on the source, which is correct if all the files are in the same directory:

" " or "/template/main/"

Thanks
maz


Poster: Hergio
Dated: Friday August 22 2003 - 23:26:59 BST

We have a scriptpath problem here, in your milonic_src file, there is a variable called scriptpath. This should point to the directory where mmenudom and mmenuns4 are located. See either of these
http://www.milonic.com/forum/viewtopic.php?t=2176#7122
http://www.milonic.com/forum/viewtopic.php?t=2331#7883


Poster: Maz
Dated: Saturday August 23 2003 - 0:34:50 BST

... :|

Full url's don't work.

I have htaccess blocking index page, is it possible I have to add js files to it?

Running out of ideas.
maz


Poster: Hergio
Dated: Saturday August 23 2003 - 3:32:21 BST

Aww geez...you see those two slashes in front of your scriptpath? the // in javascript means 'comment out this line, dont read it'. So it wasn't reading your scriptpath. Uncomment it by removing the // and see what happens.


Poster: Maz
Dated: Saturday August 23 2003 - 5:25:58 BST

Brilliant Hergio :D

I was told once never touch the source file :|

I took a quick look on windows, you probably don't see what I'm getting on the mac.

I don't want see through submenus but I do want shadow, can I remove this line:
Code:
Alpha(opacity=90);


The Tools menu with followscroll is 2px's too high, on the mac its perfect with 1px white border between menus.

On the mac the Tools background image is covering the whole page, repeating horizontally. I got rid of it locally by removing all slashes, placed semicolon after top 6 styles. I can try placing bgimage in each submenu style.

If you see something I haven't pointed out, please let me know.

Thank you
maz :P


Poster: John
Dated: Saturday August 23 2003 - 5:31:58 BST

maz wrote:
I was told once never touch the source file

Depends entirely on how you set up your directories. If everything is in the 'root' of your site then you don't need to set anything in scriptpath. Andy has some pretty good comments added to the areas that might need changes. It would be a good idea to read them.
maz wrote:
I don't want see through submenus but I do want shadow, can I remove this line:
Code:
Alpha(opacity=90);

Yes.


Poster: Maz
Dated: Saturday August 23 2003 - 8:17:25 BST

Ooops must not have pressed submit on last post :oops:

bgimage covering page on mac: solved placed in main menu items.
offbgcolor problem covering the page: solved placing script in HEAD.

Menu is working but site is not, no active links.
8O


Poster: Maz
Dated: Saturday August 23 2003 - 17:44:01 BST

I set up form attributes for design, not linkage.
If they are trying to connect to CGI then it may override php site links.
I think I solved it and a php volunteer should be able to fix it.
maz


Poster: Maz
Dated: Tuesday August 26 2003 - 10:38:54 BST

I've had endless problems with the forms in the Tools menu, first I wanted type=forms;type=header because the form background doesn't need to be active, but I can't use type twice. :cry:

Now I'm thinking that the page links freeze I'm getting is because of permissions. If I have to change menu permissions for forms, do I also have to change permissions for all related js files :?:

Now I know how to activate forms to php, but it caused an error in the files so I removed it and all the forms, reinstalled js and its still acting up.

All I wanted to do was to set up the menu design without activating simple get and post form elements. At this time I have to disable the menu to edit static pages.

I thought of using onclick to clear forms, does it go something like this? url=javascript:onClick=reset(''); the second equals doesn't look right.

Suggestions welcome,
maz


Poster: Hergio
Dated: Tuesday August 26 2003 - 21:26:20 BST

I dont really get what you are trying to do with the forms. I dont see why permissions would have anything to do with it when it comes to js. Your only reading the js files and if they are in your wwwroot directory, everything should be read access. But I can help you with the javascript call. Do url=javascript:reset(); You dont need the onClick because it will take care of itself since its a <a> element already! ;)


Poster: John
Dated: Tuesday August 26 2003 - 22:26:58 BST

Hergio wrote:
I dont really get what you are trying to do with the forms.

Jeez - finally, something Dave doesn't understand :lol: Now I feel better... ;)


Poster: Maz
Dated: Tuesday August 26 2003 - 22:39:43 BST

Ah! Great things come in small packages. Thankyou :D

I learned something new, permissions are set within javascript. That would make a good entry for the directory.

After starting over with clean files, my links are active again, but only by leaving off the followcroll menu, then I got a real error page. Although it relates to entering mysql, I believe it is simpler than that, I think its just the validation code that needs updating since adding the new menu validation.

Perhaps someone knows this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
     "http://www.w3.org/TR/html4/strict.dtd">
     
<html xmlns="http://www.w3.org/1999/xhtml">


So I went to w3.org to locate an update, should I try the latest version to work with the menu?

This version:
http://www.w3.org/TR/2002/REC-xhtml1-20020801
Latest version:
http://www.w3.org/TR/xhtml1
Previous version:
http://www.w3.org/TR/2000/REC-xhtml1-20000126
Diff-marked version:
http://www.w3.org/TR/2002/REC-xhtml1-20 ... -diff.html

If you have an idea say so, trial and error is risky business... :P
Thanks
maz


Poster: John
Dated: Tuesday August 26 2003 - 23:29:40 BST

I'm not sure I'd go 'strict', unless you really know what you're doing with your code (not implying you don't, just saying). Try...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


Poster: Maz
Dated: Tuesday August 26 2003 - 23:53:47 BST

Let me go over what you are saying, don't go strict on the menu html, and update the xhtml?

I've never dealt with versions before, with html I used what everyone else was using.

I tried updating the xhtml to current and latest versions, neither made any difference to the error, but it did appear to run smoother and quicker.

Warning: Missing argument 3 for update() in database.class.php on line 126 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line

So it still could be just the strict version, or wishful thinking.

Thanks for the quick reply :)
maz


Poster: John
Dated: Tuesday August 26 2003 - 23:59:48 BST

I was just saying, in general, strict is just that - strict. This refers to the HTML for your page and not to the menu code (which is not HTML).

The doctype is not going to make any difference to your error. From what you posted it seems pretty clear you have an error in your SQL syntax. Sorry... :(


Poster: Maz
Dated: Wednesday August 27 2003 - 0:15:15 BST

Yep, I think it just fixed the problem, now the file needs mending. :(
I'm not getting the menu listed in the error report. I think thats a good thing.

Thanks again
maz


Poster: Maz
Dated: Wednesday August 27 2003 - 0:45:03 BST

All fixed :D and back to see if I can add the 2nd menu (vertical followscroll) without fouling up again.
maz


Poster: John
Dated: Wednesday August 27 2003 - 3:37:25 BST

All right :!: Glad to hear it. :D


Poster: Hergio
Dated: Wednesday August 27 2003 - 3:50:52 BST

I'm pretty sure Andy has been good about making the HTML that is generated by the menu code follow the rules in terms of closing tags, quoteing properly, and all the other good stuff it takes to be compliant. ;) Good job Andy. (and if you havent been making an effort to do that, than you are one lucky guy)


Poster: Maz
Dated: Wednesday August 27 2003 - 5:39:49 BST

:D Oh no the menu didn't do anything wrong. :P
My backend team couldn't see the error because of the menu problems, in turn it helped me locate the validation problem. All good.
maz


Poster: Maz
Dated: Wednesday August 27 2003 - 18:53:17 BST

Okay, back to square 1, I add the 2nd menu, vertical followscroll and the page with html links freeze, it may be browser specific, but that doesn't make sense because it works fine on the Milonic site.

I need to locate the conflict. I'll only have time late today.

First I'll take a look at the milonic site to see if I can compare details, the only difference being there is only one main menu and one submenu. Oh, I only used the download link, there wasn't much on that page, everything else is menu links.

What else is different from the horizontal menu that works: ie. followscroll, 2 scrollbars.

maz :?


Poster: John
Dated: Wednesday August 27 2003 - 21:26:16 BST

Since you have the first one working OK, and this thread is getting just a tad long, please post this again as a new topic and post the URL there again.

Thanks.


Poster: Maz
Dated: Wednesday August 27 2003 - 22:08:44 BST

Will do, when I have time.

Anyone following this thread might be wandering what the conflict was that rendered page links useless.
It was followscroll. Possibly a conflict with the <br end_all /> tag, for those who ever use it.

Also if you have an old browser like me followscroll may be the cause of the submenu to jump to the opposite side of the page.

I tried both methods, followscroll=1; & followscroll = "1,100,2";

maz