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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:35

Javascript error


Poster: yohann
Dated: Monday January 27 2003 - 15:08:54 GMT

Hello, we have difficulties to load a sub-menu in a frame :
we have a frameset called SigmaFrame.htm
The left frame is SigmaMenu.htm where the main menu appears
The body frame is SigmaCorps.htm

We put the code of the menu in the html pages (the sub menu in the main frame, the main menu in the left frame)

And here is the code where the main menu calls the sub menu :

,"Affaire","show-menu=SousAffaire target=SigmaCorps;sourceframe=SigmaCorps.htm;",,"Affaire",1

Here is the code of my frame-side :
/*
Milonic DHTML Website Navigation Menu
Written by Andy Woolley - Copyright 2002 (c) Milonic Solutions Limited. All Rights Reserved.
Please visit http://www.milonic.co.uk/menu or e-mail menu3 __at__ milonic.com for more information.

The Free use of this menu is only available to Non-Profit, Educational & Personal web sites.
Commercial and Corporate licenses are available for use on all other web sites & Intranets.
All Copyright notices MUST remain in place at ALL times and, please keep us informed of your
intentions to use the menu and send us your URL.

If you are having difficulty with the menu please read the FAQ at http://www.milonic.co.uk/menu/faq.php before contacting us.

Please note that the above text CAN be erased if you wish as long as copyright notices remain in place.
*/

//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.



////////////////////////////////////
// Editable properties START here //
////////////////////////////////////


// Special effect string for IE5.5 or above please visit http://www.milonic.co.uk/menu/filters_sample.php for more filters
if(navigator.appVersion.indexOf("MSIE 6.0")>0){
effect = "Fade(duration=0.2);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"
}
else{
effect = "Shadow(color='#777777', Direction=135, Strength=5)"
}

// Fonction d'ouverture de magic
function openNewWindow(winURL,winWidth,winHeight,winConfig){
mmConfig=""
mmConfig="width="+winWidth+","
mmConfig+="height="+winHeight+","
mmConfig+=winConfig
var mmWin=open(winURL,"",mmConfig);
mmWin.focus();
}

// Type d'effet pour l'affichage
//effect = "Fade(duration=0.2);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"

timegap=500 // The time delay for menus to remain visible
followspeed=5 // Follow Scrolling speed
followrate=40 // Follow Scrolling Rate
suboffset_top=10; // Sub menu offset Top position
suboffset_left=10; // Sub menu offset Left position
Frames_Top_Offset=0 // Frames Page Adjustment for Top Offset
Frames_Left_Offset=-36 // Frames Page Adjustment for Left Offset

// Déclaration du style
MonStyle=[
"navy", // Couleur de la police non pointée par la souris
"ccccff", // Couleur du fond non pointé par la souris (zero pour transparent avec Netscape 6)
"ffebdc", // Couleur de la police survolée par la souris
"4b0082", // Couleur du fond survolé par la souris
"000000", // Couleur de la bordure du menu
12, // Taille de la police en pixels
"normal", // Style de la police (italique ou normal)
"bold", // Epaisseur de la police (gras ou normal)
"Verdana, Arial", // Nom de la police
4, // Menu Item Padding
"", // Image du sous-menu (à droite), laisser à blanc si nécessaire
, // 3D Border & Separator bar Bordure et séparateur 3D
"66ffff", // 3D High Color Couleur 3D Haute
"000099", // 3D Low Color Couleur 3D Basse
"Purple", // Couleur de la police de la page (en cas de recouvrement par le menu), laisser à blanc pour désactiver
"pink", // Couleur de fond de la page (laisser à blanc pour désactiver)
"arrowdn.gif", // Image du haut (laisser à blanc pour désactiver)
"ffffff", // Couleur du Header
"000099", // couleur de fond du Header
"navy", // Couleur du Séparateur des sous-titres (pour utiliser un séparateur ou non dans les
// sous-menus, on précise cela dans le lien (dernières lignes du menu : 0 ou 1 pour séparer).
]

// Déclaration du menu (niveau 1 du menu)
addmenu(menu=[ // C'est le tableau qui contient les propriétés et les titres du menu
"SigmaMenu", // Nom du Menu - Nécessaire pour appeler ce Menu
36, // Position Haute - La position haute du menu en pixels
10, // Position Gauche - La position gauche du menu en pixels
110, // Largeur - Largeur du menu (en pixels)
1, // Largeur de la bordure du menu
"left", // Position sur l'écran - ici vous pouvez utiliser "center;left;right;middle;top;bottom" ou une combinaison de "center:middle"
MonStyle, // Tableau de Propriété - Un tableau de propriétés, comme défini précédemment
1, // Toujours Visible - permet aux éléments du tableau d'être toujours visibles (1=on/0=off)
"left", // Alignement - Gère l'alignement des sets the menu elements text alignment, values valid here are: left, right or center
, // Filtre - Variable texte pour instaurer des effets transitionels à l'activation du menu
, // Scrolling - Dit au menu de suivre l'utilisateur lorqu'il monte ou descend dans la page (tout le temps visible) (1=on/0=off)
0, // Menu Horizontal - Dit menu de devenir Horizontal au lieu de Vertical (1=on/0=off)
1, // Garde en Vie - Laisse le menu visible jusqu'à ce que l'utilisateur aille vers un autre menu ou clique quelque part dans la page (1=on/0=off)
, // Position du Haut de la sous-image : left:center:right
, // Met la Largeur Moyenne du Menu Horizontal à 100% et la hauteur au taux spécifié (Laisser à blanc pour désactiver)
, // Droite à Gauche : utilisé en Hébreux par ex. (1=on/0=off)
, // Ouvre les menus par OnClick - laisser blanc pour ouvrir avec MouseOver (1=on/0=off)
, // ID du div à masquer avec le MouseOver (utile pour cacher les éléments des formulaires)
, // Image de fond pour le menu quand BGColor est transparente
, // Menu Déroulant
, // Reservé à un usage futur
// "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"Applications","# align=center;type=header;",,,1
,"Modulo","javascript:allervers(\"MO\");",,"Modulo",1
,"Maintenance","javascript:allervers(\"FM\");",,"Maintenance",1
,"Frais","javascript:allervers(\"FR\");",,"Frais",1
,"Affaire","show-menu=SousAffaire target=SigmaCorps;sourceframe=SigmaCorps;",,"Affaire",1
,"Magic","javascript:openNewWindow(\"http://89.131.0.22/magictsd\",600,400,\"scrollbars=yes,status=yes,location=yes,resizable=yes\");",,"Magic",1
,"<img border=0 src=http://necpii350-74/SigmaIntranet/images/mail.gif width=82 height=17 >","javascript:test(\"event\");",,"Mail",1
,"<img border=0 src=http://necpii350-74/SigmaIntranet/images/vers_intranet.gif width=82 height=17>","javascript:test(\"event\");",,"Mail",1
,"<img border=0 src=http://necpii350-74/SigmaIntranet/images/quitter.gif width=82 height=17 >","javascript:test(\"event\");",,"Mail",1
])

dumpmenus()

Here is the code of my frame-body :
/*
Milonic DHTML Website Navigation Menu
Written by Andy Woolley - Copyright 2002 (c) Milonic Solutions Limited. All Rights Reserved.
Please visit http://www.milonic.co.uk/menu or e-mail menu3 __at__ milonic.com for more information.

The Free use of this menu is only available to Non-Profit, Educational & Personal web sites.
Commercial and Corporate licenses are available for use on all other web sites & Intranets.
All Copyright notices MUST remain in place at ALL times and, please keep us informed of your
intentions to use the menu and send us your URL.

If you are having difficulty with the menu please read the FAQ at http://www.milonic.co.uk/menu/faq.php before contacting us.

Please note that the above text CAN be erased if you wish as long as copyright notices remain in place.
*/

//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.



////////////////////////////////////
// Editable properties START here //
////////////////////////////////////


// Special effect string for IE5.5 or above please visit http://www.milonic.co.uk/menu/filters_sample.php for more filters
if(navigator.appVersion.indexOf("MSIE 6.0")>0){
effect = "Fade(duration=0.2);Alpha(style=0,opacity=88);Shadow(color='#777777', Direction=135, Strength=5)"
}
else{
effect = "Shadow(color='#777777', Direction=135, Strength=5)"
}


timegap=500 // The time delay for menus to remain visible
followspeed=5 // Follow Scrolling speed
followrate=40 // Follow Scrolling Rate
suboffset_top=10; // Sub menu offset Top position
suboffset_left=10; // Sub menu offset Left position
Frames_Top_Offset=0 // Frames Page Adjustment for Top Offset
Frames_Left_Offset=-36 // Frames Page Adjustment for Left Offset



// Déclaration du style
MonStyle2=[
"navy", // Off Font Color
"ccccff", // Off Back Color
"FFEBCD", // On Font Color
"4B0082", // On Back Color
"000000", // Border Color
12, // Font Size
"normal", // Font Style
"bold", // Font Weight
"Verdana, Tahoma, Arial, Helvetica", // Font
4, // Padding
"arrow.gif" // Sub Menu Image
, // 3D Border & Separator
,"66ccff" // 3D High Color
,"000099" // 3D Low Color
]


// Sous menu de Affaire
addmenu(menu=["SousAffaire",
,,100,1,"",MonStyle2,,"left",,,,,,,,,,,,,
,"Gestion","javascript:allervers(\"AF\");",,"Gestion",1
,"Avancement","javascript:allervers(\"AV\");",,"Avancement",1
,"Facturation","javascript:allervers(\"FAF\");",,"Facturation",1
,"Correction&nbsp;facturation","javascript:allervers(\"FAH\");",,"Correction&nbsp;facturation",1
,"Verrouillage","javascript:allervers(\"FAV\");",,"Verrouillage",1
])//


dumpmenus()

Could you help us please ?


Poster: kevin3442
Dated: Monday January 27 2003 - 17:22:34 GMT

Hi Yohann,

From the following code:
Code:
,"Affaire","show-menu=SousAffaire target=SigmaCorps;sourceframe=SigmaCorps.htm;",,"Affaire",1

I wonder if your use of target and sourceframe are correct. The target= and sourceframe= values should be the name of your body frame, as given in the name= attribute of the <frame> tag that defines the frame, within the frameset that is defined in the SigmaFrame.htm file. I see, for example, sourceframe=SigmaCorps.htm. The setting should not be the name of an htm file, it should be the name of the frame containing the file.

Hope that helps,

Kevin


Poster: yohann
Dated: Tuesday January 28 2003 - 7:34:24 GMT

hi kevin3442, thx for 4 interest of my problem.

But i tried to put the name of my body-frame as "SigmaCorps" but the problem is not resolve.

If u have more ideas....

Thx 8)


Poster: kevin3442
Dated: Tuesday January 28 2003 - 19:40:13 GMT

Hi Yohann,

Would it be possible for you to post a URL to the site you are working on? If I could see the site, and have a look at all of the code involved, I would be able to help more effectively.

Kevin


Poster: yohann
Dated: Wednesday January 29 2003 - 13:55:53 GMT

KEVIN CAN U SEND ME YOUR EMAIL ?

i would send a zip file including all my pages and scripts

thx :D


Poster: kevin3442
Dated: Wednesday January 29 2003 - 18:05:19 GMT

Hi Yohann,

I know this sounds terrible, but I generally don't post any of my email addresses in a public forum. I get so much spam already, and I'm paranoid about it now. I've learned the hard way that, if you put your address in a public place for even a day, it can dramatically increase the amount of spam you get.

Tell you what... there's a separate mailing list that alot of menu users frequent for support. You can register here. After you register, send a message to the list. You could attach your files to the email (zip them first, then attach the .zip to make sure some files aren't stripped). The group has a lot of people, and any one of them -- including myself -- might spot the problem. If you don't want to send the .zip attachment to the whole group, you can see my email address in any one of my posts to the list (I am Kevin Clements); you could email the files directly to me that way. Sorry to make it difficult for you, but I really am paranoid about my addresses. Plus, this way, you'll be on the mailing list too, which is a growing and helpful community of Milonic Menu users.

Kevin