Error with converted menus
- simongdawson
- Super Advanced
- Posts: 49
- Joined: Sun Oct 12, 2003 6:56 am
- Location: UK
- Contact:
Error with converted menus
My converted menus (menu_data_1.js and menu_data_2.js) both give the
same error message:
Line: 12
Char: 6
Error: Syntax Error
Code: 0
URL: <http://www.the-limes.com/milonic5_test.html>
and neither of the menus display.
The menus worked perfectly in v3. I then used the menu converter on the Milonic site to convert them to v5 and added the relevant additional files to my website. All of the milonic menu files (both v3 and v5) are located on my website in the directory http://www.the-limes.com/java/
Can anyone tell me how to correct this, please?
same error message:
Line: 12
Char: 6
Error: Syntax Error
Code: 0
URL: <http://www.the-limes.com/milonic5_test.html>
and neither of the menus display.
The menus worked perfectly in v3. I then used the menu converter on the Milonic site to convert them to v5 and added the relevant additional files to my website. All of the milonic menu files (both v3 and v5) are located on my website in the directory http://www.the-limes.com/java/
Can anyone tell me how to correct this, please?
One of the things that I spotted is the lack of a ";" at the end of each line.
You have:
aI("text=Simons Work;showmenu=WorkMenu;url=#;status=Mouse over to see menu for Simons work")
I beleive it should be:
aI("text=Simons Work;showmenu=WorkMenu;url=#;status=Mouse over to see menu for Simons work;");
A ";" is used to end each option and also the end of the line of code.
You have:
aI("text=Simons Work;showmenu=WorkMenu;url=#;status=Mouse over to see menu for Simons work")
I beleive it should be:
aI("text=Simons Work;showmenu=WorkMenu;url=#;status=Mouse over to see menu for Simons work;");
A ";" is used to end each option and also the end of the line of code.
I see at least 2 problems...
1. Your JS calls in the HTML are wrong. I don't remember exactly when the format changed, but you will need to read install.txt that is in the new download - it's there for a reason.
2. RC17 is the current release. You are running RC11. Upgrade.
Many of us are finding the calls work better as the first items after the <body> tag, although they should work in either place. This is not the cause of your error, however. I suspect you'll find that in #1.
1. Your JS calls in the HTML are wrong. I don't remember exactly when the format changed, but you will need to read install.txt that is in the new download - it's there for a reason.
2. RC17 is the current release. You are running RC11. Upgrade.
Many of us are finding the calls work better as the first items after the <body> tag, although they should work in either place. This is not the cause of your error, however. I suspect you'll find that in #1.
John
- simongdawson
- Super Advanced
- Posts: 49
- Joined: Sun Oct 12, 2003 6:56 am
- Location: UK
- Contact:
I've done all the things above (latest RC17, added semicolons, new js calls in html) but still nothing. I don't know if it is relevant but the downloaded sample menu doesn't work either - see http://www.the-limes.com/milonic5_sample.html
Is it anything to do with my having the scripts in a separate directory?
Is it anything to do with my having the scripts in a separate directory?
- simongdawson
- Super Advanced
- Posts: 49
- Joined: Sun Oct 12, 2003 6:56 am
- Location: UK
- Contact:
- simongdawson
- Super Advanced
- Posts: 49
- Joined: Sun Oct 12, 2003 6:56 am
- Location: UK
- Contact:
I've been experimenting. I've just made a new directory at http://www.the-limes.com/milonic/ and then copied into it the v5 sample files and made a new html page in that diectory http://www.the-limes.com/milonic/sample.html onto which I pasted the js calls from readme.txt. The menu works perfectly. I then copied to http://www.the-limes.com/milonic/ my own two menu_data files and called them up from a new page within the directory http://www.the-limes.com/milonic/test.html. menu_data_1 works perfectly, menu_data_2 still has a problem, so I have temporarily put it between <!-- and --> . Please note that all of these .js files are just copies from the /Java/ directory on my website and not altered in any way.
There is definitely something wrong in the way that the menu script is handling the location of scripts when they are not in the same directory as the page calling for them.
RC8 had a line at the top of milonic_src.js reading //scriptpath=""; which could be altered e.g. scriptpath="/java/"; but this line does not exist in RC17 and when I added it, it made no difference.
Does this help you to help me, please?
There is definitely something wrong in the way that the menu script is handling the location of scripts when they are not in the same directory as the page calling for them.
RC8 had a line at the top of milonic_src.js reading //scriptpath=""; which could be altered e.g. scriptpath="/java/"; but this line does not exist in RC17 and when I added it, it made no difference.
Does this help you to help me, please?
- fredlongworthhighschool
- Mega Advanced
- Posts: 362
- Joined: Fri Jun 27, 2003 11:34 am
- Location: Manchester, England.
- Contact:
"Scriptpath" was removed last month. There is more about it here http://milonic.com/forum/viewtopic.php?t=2529
Andy Davis
Web Designer & Smartboard Manager
Fred Longworth High School, Manchester, England.
Web Designer & Smartboard Manager
Fred Longworth High School, Manchester, England.
In "menu data 2" you have the following code:
with(=new mm_style()){
offcolor="#228B22";
offbgcolor="#FFFFF0";
oncolor="#FF0000";
onbgcolor="#FFFFF0";
fontsize="14";
fontstyle="normal";
fontweight="bold";
fontfamily="Tahoma,Helvetica,Verdana";
padding=2;
You have a missing name on the the first line, plus I not sure that code is not suppose to be deleted since you follow it with the correct code in your file.
with(somename=new mm_style()){
with(=new mm_style()){
offcolor="#228B22";
offbgcolor="#FFFFF0";
oncolor="#FF0000";
onbgcolor="#FFFFF0";
fontsize="14";
fontstyle="normal";
fontweight="bold";
fontfamily="Tahoma,Helvetica,Verdana";
padding=2;
You have a missing name on the the first line, plus I not sure that code is not suppose to be deleted since you follow it with the correct code in your file.
with(somename=new mm_style()){
Nice catch, BW. I missed that one. Hopefully that's it.
Andy is correct on scriptpath. It's gone, so don't try to add it back in.
Andy is correct on scriptpath. It's gone, so don't try to add it back in.
Actually that function works just fine. The problem is elsewhere.simongdawson wrote:There is definitely something wrong in the way that the menu script is handling the location of scripts when they are not in the same directory as the page calling for them.
John
- simongdawson
- Super Advanced
- Posts: 49
- Joined: Sun Oct 12, 2003 6:56 am
- Location: UK
- Contact:
I cannot for the life of me explain this, but....
I got the sample and my two menu_data files working in the http://www.the-limes.com/milonic/ directory on the pages http://www.the-limes.com/milonic/sample.html and http://www.the-limes.com/milonic/test.html.
I then changed the links to on http://www.the-limes.com/milonic5_test.html to link to the /milonic/ files instead of the /java/ files and lo and behold the page and menu worked perfectly. So I copied the files again form /milonic/ to /java/ to make sure that they were the same. Changed the js calls on http://www.the-limes.com/milonic5_test.html back to the /java/ files and it was back to not working. They only seem to work in the other /milonic/ directory.........
I got the sample and my two menu_data files working in the http://www.the-limes.com/milonic/ directory on the pages http://www.the-limes.com/milonic/sample.html and http://www.the-limes.com/milonic/test.html.
I then changed the links to on http://www.the-limes.com/milonic5_test.html to link to the /milonic/ files instead of the /java/ files and lo and behold the page and menu worked perfectly. So I copied the files again form /milonic/ to /java/ to make sure that they were the same. Changed the js calls on http://www.the-limes.com/milonic5_test.html back to the /java/ files and it was back to not working. They only seem to work in the other /milonic/ directory.........
You still need your /milonic/ paths:
<SCRIPT language=JavaScript src="/milonic/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/milonic/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/milonic/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="/milonic/menu_data.js" type=text/javascript></SCRIPT>
Regards
maz
<SCRIPT language=JavaScript src="/milonic/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/milonic/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/milonic/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="/milonic/menu_data.js" type=text/javascript></SCRIPT>
Regards
maz
- simongdawson
- Super Advanced
- Posts: 49
- Joined: Sun Oct 12, 2003 6:56 am
- Location: UK
- Contact:
Yes, they work like that. But why, when I have exactly the same files in the /java/ directory does it not work if I change the js calls to the /java/ directory?maz wrote:You still need your /milonic/ paths:
<SCRIPT language=JavaScript src="/milonic/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/milonic/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/milonic/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="/milonic/menu_data.js" type=text/javascript></SCRIPT>
Regards
maz
I just checked out the link http://www.the-limes.com/milonic5_test.html and this file still points to the "milonic" directory. Where is the test link that uses the "java" directory??
- simongdawson
- Super Advanced
- Posts: 49
- Joined: Sun Oct 12, 2003 6:56 am
- Location: UK
- Contact:
Sorry about that - I've been using the same test page and editing the js calls from one directory to another. Now I have set up two test pages, one for each directory. The /java/ test page is now at http://www.the-limes.com/milonic5_test2.html whereas the /milonic/ test page is at http://www.the-limes.com/milonic5_test.htmlbobwill wrote:I just checked out the link http://www.the-limes.com/milonic5_test.html and this file still points to the "milonic" directory. Where is the test link that uses the "java" directory??
The http://www.the-limes.com/milonic5_test2.html link had no issues using IE6. But I did notice a problem that you may want to clear up in menu_data_1.js and menu_data_2.js:
Notice the double semicolon's before the status? and no semicolon before the end of the line's quotation mark? Good practice would be as follows:
Also, the following code, at the top of each file, only needs to be declared once for each page. Keep it in the first menu you call. Otherwise, you're just wasting space.
Code: Select all
with(milonic=new menuname("SubMenu")){
itemwidth=110;
style=menuStyle;
aI("text=Simons Work;showmenu=WorkMenu;url=#;status=Mouse over to see menu for Simons work");
aI("text=Genealogy;showmenu=GenealogyMenu;url=#;status=Mouse over for Genealogy menu");
aI("text=Contacts;showmenu=ContactMenu;url=#;status=Mouse over for Contacts menu");
aI("text=Links;showmenu=LinksMenu;url=#;status=Mouse over to see Links menu");
aI("text=Guest Book;url=http://www.the-limes.com/guestbook/index.php;;status=Click to go to our Guest Book");
aI("text=Search;url=http://www.the-limes.com/search/search.html;;status=Click to search within our web site");
}
with(milonic=new menuname("EmailMenu")){
itemwidth=60;
style=menuStyle;
aI("text=Thelma;url=mailto:tdawson@the-limes.com;;status=Click to email Thelma");
aI("text=Simon;url=mailto:simon@the-limes.com;;status=Click to email Simon");
}
Code: Select all
aI("text=Simons Work;showmenu=WorkMenu;url=#;status=Mouse over to see menu for Simons work;");
Code: Select all
_menuCloseDelay=500;
_menuOpenDelay=150;
_scrollAmount=3;
_scrollDelay=20;
_followSpeed=5;
_followRate=40;
_subOffsetTop=4;
_subOffsetLeft=6;
Last edited by bzeitner on Tue Oct 14, 2003 7:44 pm, edited 1 time in total.
I think I found the source of your issue... in the /milonic/menu_data_2.js file, I found the following line:
I really don't think the menu is set up to handle something like that. Or could I be wrong? Even if it does work, I don't see this function declared in any of the included source files.
Code: Select all
aI("text=<script language='JavaScript'>dT();</script>;url=#;align=right;;status=#;");
Yes you are allowed to incorporate SCRIPT includes into the text of a menu item. Whatever is inside those script tags is executed as if it was written out in the open in the page. You just have to nail the syntax and what your quotes and single quotes.
Dave Hergert
Software Engineer
"Helping to make the menu better, one at a time."
Software Engineer
"Helping to make the menu better, one at a time."