IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

target="_blank" dans menu


Sujet :

JavaScript

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Août 2004
    Messages
    39
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Août 2004
    Messages : 39
    Par défaut target="_blank" dans menu
    Bonjour,
    J'ai un petit problème que je n'arrive pas à résoudre.
    J'essaie depuis plusieurs heures à insérer :

    target="_blank"

    sur le lien du menu: "http://www.forwardhc.ch/WebCalendar/

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    addmenu(menu=["calendrier",,,150,0,,style1,0,"left",effect,,,,,,,,,,,,
    	,"PLAN DE GLACE", "http://www.forwardhc.ch/WebCalendar/ ",,"",1
    Merci de votre aide
    daddy

  2. #2
    Inactif  
    Avatar de Kerod
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    11 672
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 11 672
    Par défaut
    Tu dois sortir ce code d'un script précis, dans cas il faudrait montrer au mois la définition de la fonction.

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Août 2004
    Messages
    39
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Août 2004
    Messages : 39
    Par défaut
    Déjà, merci d'avoir répondu.
    Voici le script: menu_array.js
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    /*
     
     Milonic DHTML Website Navigation Menu - Version 3.x
     
    */
     
     
     
    ////////////////////////////////////
    // 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
    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=4		// Follow Scrolling Rate
    suboffset_top=10;	// Sous menu offset Top position 
    suboffset_left=10;	// Sub menu offset Left position
    closeOnClick = true
     
    style1=[			// style1 is an array of properties. You can have as many property arrays as you need. This means that menus can have their own style.
    "FFFFFF",				// Couleur du texte
    "CC0000",			// Couleur des cellules
    "FFFFFF",			// Couleur du texte ou passe la souris
    "#333333",			// Couleur de la cellule ou passe la souris
    "000000",			// Menu Border Color 
    12,					// Font Size in pixels
    "normal",			// Font Style (italic or normal)
    "bold",				// Font Weight (bold or normal)
    "Verdana, Arial",	// Font Name
    5,					// Menu Item Padding
    "/images/arrow.gif",		// Sub Menu Image (Leave this blank if not needed)
    ,					// 3D Border & Separator bar
    "66ffff",			// 3D High Color
    "000099",			// 3D Low Color
    "FFFFFF",			// Current Page Item Font Color (leave this blank to disable)
    "#333333",				// Current Page Item Background Color (leave this blank to disable)
    "images/arrow.gif",		// Top Bar image (Leave this blank to disable)
    "FF0000",			// Menu Header Font Color (Leave blank if headers are not needed)
    "FF0000",			// Menu Header Background Color (Leave blank if headers are not needed)
    "FFFFFF",				// Menu Item Separator Color
    ]
     
     
     
    addmenu(menu=[		// This is the array that contains your menu properties and details
    "mainmenu",			// Menu Name - This is needed in order for the menu to be called
    155,					// Menu Top - position Top du menu en pixels
    10,				// Menu Left - position a gauche du menu enpixels
    160,					// Menu Width - Menus width in pixels
    0,					// Menu Border Width 
    ,					// Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
    style1,				// Properties Array - this is set higher up, as above
    1,					// Always Visible - allows the menu item to be visible at all time (1=on/0=off)
    "left",				// Alignment - sets the menu elements text alignment, values valid here are: left, right or center
    ,					// Filter - Text variable for setting transitional effects on menu activation - see above for more info
    ,					// Follow Scrolling - Tells the menu item to follow the user down the screen (visible at all times) (1=on/0=off)
    0, 					// Position du Menu -  (1=horizontal/0=vertical)
    ,					// Keep Alive - Keeps the menu visible until the user moves over another menu or clicks elsewhere on the page (1=on/0=off)
    ,					// Position of TOP sub image left:center:right
    ,					// Set the Overall Width of Horizontal Menu to 100% and height to the specified amount (Leave blank to disable)
    ,					// Right To Left - Used in Hebrew for example. (1=on/0=off)
    ,					// Open the Menus OnClick - leave blank for OnMouseover (1=on/0=off)
    ,					// ID of the div you want to hide on MouseOver (useful for hiding form elements)
    ,					// Background image for menu when BGColor set to transparent.
    ,					// Scrollable Menu
    ,					// Reserved for future use
    ,"ACCUEIL","http://www.forwardhc.ch/index.php",,"",1 
    ,"ÉQUIPES","show-menu=equipe",,"",1
    ,"MOJU","show-menu=moju",,"",1
    ,"CALENDRIERS","show-menu=calendrier",,"",1
    ,"INFOS CLUB","show-menu=infos",,"",1
    ,"PATINOIRE","/infos_club/patinoire.htm",,"",1
    ,"LIENS","show-menu=lien",,"",1
    ])
     
      	addmenu(menu=["equipe",,,150,0,,style1,0,"left",effect,,,,,,,,,,,,
    	,"LA PREMIÈRE","show-menu=premiere",,,1
    	,"LA DEUX","show-menu=deux",,,1
    	])
     
    		addmenu(menu=["premiere",,,150,0,,style1,0,"left",effect,,,,,,,,,,,,
    		,"CONTINGENT","http://www.forwardhc.ch/~premiere/",,"",1
    		,"MATCH","http://www.forwardhc.ch/~premiere",,"",1
    		,"CLASSEMENT","http://www.forwardhc.ch/~premiere",,"",1
    		])
     
    		addmenu(menu=["deux",,,150,0,,style1,0,"left",effect,,,,,,,,,,,,
    		,"CONTINGENT","http://www.forwardhc.ch/~deux/",,"",1
    		,"MATCH","http://www.forwardhc.ch/~deux/",,"",1
    		,"CLASSEMENT","http://www.forwardhc.ch/~deux/",,"",1
    		])
     
    	addmenu(menu=["Moju",,,150,0,"",style1,,"left",effect,,,,,,,,,,,,
    	,"JUNIORS","http://www.forwardhc.ch/~juniors/",,"",1
    	,"NOVICES","http://www.forwardhc.ch/~novices/",,"",1
    	,"MINIS","http://www.forwardhc.ch/~minis/",,"",1
    	,"MOSKITOS A","http://www.forwardhc.ch/~moskitos_a/",,"",1
    	,"MOSKITOS B","http://www.forwardhc.ch/~moskitos_b/",,"",1
    	,"PICCOLOS","http://www.forwardhc.ch/~piccolos/",,"",1
    	,"BAMBINIS","http://www.forwardhc.ch/~bambinis/",,"",1
    	,"ÉCOLE DE HOCKEY","http://www.forwardhc.ch/~ecole/",,"",1
    	])
     
    	addmenu(menu=["calendrier",,,150,0,,style1,0,"left",effect,,,,,,,,,,,,
    	,"PLAN DE GLACE", "http://www.forwardhc.ch/WebCalendar/ ",,"",1 
    	,"MANIFESTATIONS","http://www.forwardhc.ch/calendrier/manifestation.htm",,"",1 
    	])
     
     
    dumpmenus()

  4. #4
    Inactif  
    Avatar de Kerod
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    11 672
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 11 672
    Par défaut
    Je sais pas si c'est moi mais je vois que des appels de fonction (pour ajouter les menus). Ce qu'il faut c'est la définition de la fonction addmenu

  5. #5
    Membre averti
    Profil pro
    Inscrit en
    Août 2004
    Messages
    39
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Août 2004
    Messages : 39
    Par défaut
    Désolé, mais je n'y connaît rien en Java.
    Voilà tout ce que j'ai:
    La partie d'appel dans ma page:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    <SCRIPT language=JavaScript src="menu_array.js" type=text/javascript></SCRIPT>
    <SCRIPT language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT>
    Puis il y a un fichier: mmenu.js qui est trop long pour afficher ici?

    J'ai donc 2 fichiers: mmenu.js et menu_array.js

  6. #6
    Inactif  
    Avatar de Kerod
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    11 672
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 11 672
    Par défaut
    Ben pour faire simple tu ouvres les fichiers js et tu fais Ctrl+F et tu tappes
    function addmenu
    Ca devrait te donner le début de la fonction

+ Répondre à la discussion
Cette discussion est résolue.

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo