Page errors

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Page errors

Post by Maz »

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: Select all

_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=mailto:help@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();

User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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.... :)
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

I made these changes:

Code: Select all

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You have this in your Main Menu...

Code: Select all

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

Code: Select all

aI("text= ;itemwidth=150;type=header;");
You're missing the ; after the text item.
John
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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://milonic.com/forum/viewtopic.php?t=2176#7122
http://milonic.com/forum/viewtopic.php?t=2331#7883
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

... :|

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
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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: Select all

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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: Select all

Alpha(opacity=90);
Yes.
John
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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! ;)
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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... ;)
John
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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: Select all

<!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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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">
John
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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... :(
John
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
Post Reply