Paula Waringa
03-27-2003, 04:23 AM
Hi!
I'm very happy with my DHTML menu, but... here's another question.
As I want also put another different looking menu on several subpages I started trying that out.
It works by changing the file name 'menu_array.js' into 'menu2_array.js' and changing the code in the HTML page from
'<SCRIPT language=JavaScript scr="menu_array.js" type=text/javascript></SCRIPT>' into
<SCRIPT language=JavaScript scr="menu2_array.js" type=text/javascript></SCRIPT>'.
But then I stumbled upon a line in the 'menu_array.js' file which says:
"//The following line is critical for menu operation, and MUST APPEAR ONLY ONCE. If you have more than one menu_array.js file rem out this line in subsequent files
menunum=0;menus=new Array();_d=document;function addmenu(){menunum++;menus[menunum]=menu;}function dumpmenus(){mt="<script language=javascript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/script>";_d.write(mt)}
//Please leave the above line intact. The above also needs to be enabled if it not already enabled unless this file is part of a multi pack."
I did erase that line in my 'menu2_array.js' file, because I now indeed have more than one 'menu_array.js' file and I do want both menus to work properly. But... I got an error! It's by the way a very contradictory message, 'cause first they tell you to erase that line when having more that one 'menu_array.js' file and then they tell you to leave the line intact.
What to do? Leave the line intact in the 'menu2_array.js' file? Or not? Can anyone help me with this? Thanx in advance.
Paula
I'm very happy with my DHTML menu, but... here's another question.
As I want also put another different looking menu on several subpages I started trying that out.
It works by changing the file name 'menu_array.js' into 'menu2_array.js' and changing the code in the HTML page from
'<SCRIPT language=JavaScript scr="menu_array.js" type=text/javascript></SCRIPT>' into
<SCRIPT language=JavaScript scr="menu2_array.js" type=text/javascript></SCRIPT>'.
But then I stumbled upon a line in the 'menu_array.js' file which says:
"//The following line is critical for menu operation, and MUST APPEAR ONLY ONCE. If you have more than one menu_array.js file rem out this line in subsequent files
menunum=0;menus=new Array();_d=document;function addmenu(){menunum++;menus[menunum]=menu;}function dumpmenus(){mt="<script language=javascript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/script>";_d.write(mt)}
//Please leave the above line intact. The above also needs to be enabled if it not already enabled unless this file is part of a multi pack."
I did erase that line in my 'menu2_array.js' file, because I now indeed have more than one 'menu_array.js' file and I do want both menus to work properly. But... I got an error! It's by the way a very contradictory message, 'cause first they tell you to erase that line when having more that one 'menu_array.js' file and then they tell you to leave the line intact.
What to do? Leave the line intact in the 'menu2_array.js' file? Or not? Can anyone help me with this? Thanx in advance.
Paula