begin process at 2012 05 29 11:02:45
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Javascript / DHTML / Ajax

 > 

CSS

 > 

Général

 > 

Newbie total a besoin d'aide pour inserer menu vertical (html) en JavaScript


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

Newbie total a besoin d'aide pour inserer menu vertical (html) en JavaScript

mardi 3 juin 2008 à 21:08:31 | Newbie total a besoin d'aide pour inserer menu vertical (html) en JavaScript

lhawai1

Bonjour a tous,
Je suis totalement débutant en la matière et je connais depuis peu le mot "JavaScript". Je suis assomé d'information depuis que j'ai commencé a m'interressé à la création de sites. Mais alors la je bloque!
Voici mon probleme:
Je souhaite insérer un menu horizontal sur mon site, un menu que j'ai créé avec Dreamweaver. Ce menu a été créé en html et je souhaiterais le convertir en Javascript afin d'alleger l'HEAD de mon site.
Encore une fois, je suis totalement debutant en la matiere et je vous demande d'être indulgent sur ma naiveté et sur la façon d'exposer mon probleme.

Code HTML du menu


<html>

<head>
<title>Doudous - Mobiles Poussettes</title>
<base href="http://www.jeuxmemarre.com/">
<style><!--
.nmsw_header { font-family:Arial; font-size:11; background-color:rgb(238,196,196); }
.nmsw_headerbleu { font-family:Arial; font-weight:bold; font-size:11; background-color:rgb(191,241,249); }
.nmsw_headervert { font-family:Arial; font-weight:bold; font-size:11; background-color:rgb(166,242,187); }
.nmsw_headerviolet { font-family:Arial; font-weight:bold; font-size:11; background-color:rgb(249,199,242); border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-style:none; }
a:link {
    color: #000000;
    text-decoration: none;
}
a:visited {
    text-decoration: none;
    color: #000000;
}
a:hover {
    text-decoration: none;
    color: #000000;
}
a:active {
    text-decoration: none;
    color: #000000;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="Namo WebEditor">
<script language="JavaScript">
<!--
function namosw_cell_rollover(cell, classname) {
  if (document.all || document.getElementById) {
    cell.classBackup = cell.className;
    cell.className   = classname;
  }
}

function namosw_cell_rollout(cell)
{
  if (document.all || document.getElementById) {
    cell.className   = cell.classBackup;
  }
}
// -->
</script></head>

<body bgcolor="white" text="black">
<table border="0" width="980" height="100">
    <tr>
        <td width="980" height="50" align="center" valign="bottom">
            <table border="0" width="980" height="50">
                <tr>
                    <td width="270" background="Files/20482/arpheaderbleu1.gif" align="left" valign="bottom">
                        <table border="0" width="308" height="25" style="font-family:Arial; font-weight:bold; font-size:11px; text-align:center; line-height:100%; margin-top:0; margin-bottom:0; margin-left:0; border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-style:none;">
                            <tr>
                                <td width="107" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headerbleu')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="http://www.jeuxmemarre.com/acheter_doudou_jouets_bois_eveil_bebe_mobile_lumineu_lit.htm">Doudous - Mobiles Poussettes</a></td>
                                <td width="49" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headerbleu')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;">
                                    <p>&nbsp;<a href="PBSCCatalog.asp?CatID=245099">Jouets d'éveil</a></p>
                              </td>
                                <td width="65" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headerbleu')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=318366">Puériculture</a></td>
                                <td width="59" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headerbleu')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=318426">Porteurs Tricycles</a></td>
                            </tr>
                        </table>
                    </td>
                    <td width="699" background="Files/20482/arpheaderrouge.gif" align="left" valign="bottom">
                        <table border="0" width="668" height="25" style="font-family:Arial; font-weight:bold; font-size:11; text-align:center; line-height:100%; margin-top:0; margin-bottom:0; margin-left:0; border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:none; border-left-style:none;">
                            <tr>
                                <td width="50" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_header')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=212819">Jouets  filles</a><a href="PBSCCatalog.asp?CatID=318426"></a></td>
                                <td width="64" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_header')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=217345">Jouets garçons</a></td>
                                <td width="58" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_header')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=222463">Jouets éducatifs</a></td>
                                <td width="65" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_header')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=317982">Playmobil</a></td>
                                <td width="55" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_header')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=206282">Jouets créatifs</a></td>
                                <td width="87" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_header')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=217428">Peluches Marionnettes</a></td>
                                <td width="73" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_header')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=197445">Extérieur Jardin Plage</a></td>
                                <td width="111" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_header')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=195396">Radiocommande Modélisme</a></td>
                                <td width="47" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_header')" class="nmsw_header_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=320193">Lego</a></td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <table border="0" width="980" height="50">
                <tr>
                    <td width="561" background="Files/20482/arpheadervert.gif" height="25" align="left" valign="bottom">
                        <table border="0" width="613" height="25" style="font-family:Arial; font-weight:bold; font-size:11; text-align:center; line-height:100%; margin-top:0; margin-bottom:0; margin-left:0;">
                            <tr>
                                <td width="49" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headervert')" class="nmsw_headervert_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=165087">Tous les jeux</a></td>
                                <td width="52" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headervert')" class="nmsw_headervert_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=165086">Jeux de cartes</a></td>
                                <td width="45" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headervert')" class="nmsw_headervert_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=165094">Juniors</a></td>
                                <td width="51" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headervert')" class="nmsw_headervert_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=165095">Jeux en famille</a></td>
                                <td width="59" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headervert')" class="nmsw_headervert_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=165093">Jeux de stratégie</a></td>
                                <td width="61" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headervert')" class="nmsw_headervert_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=169903">Jeux d'experts</a></td>
                                <td width="71" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headervert')" class="nmsw_headervert_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=165092">Jeux d'addresse</a></td>
                                <td width="61" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headervert')" class="nmsw_headervert_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=245150">Echèques Dames</a></td>
                                <td width="108" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headervert')" class="nmsw_headervert_org" style="border-right-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=165096">Nos meilleurs jeux</a></td>
                            </tr>
                        </table>
                    </td>
                    <td width="408" background="Files/20482/arpheaderviolet.gif" height="25" align="left" valign="bottom">
                        <table border="0" width="363" height="25" style="font-family:Arial; font-weight:bold; font-size:11; text-align:center; line-height:100%; margin-top:0; margin-bottom:0; margin-left:1;">
                            <tr>
                                <td width="84" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headerviolet')" class="nmsw_headerviolet_org" style="border-right-width:1; border-bottom-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-bottom-style:none; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=184333">Billards - Jeux de cafés</a></td>
                                <td width="36" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headerviolet')" class="nmsw_headerviolet_org" style="border-right-width:1; border-bottom-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-bottom-style:none; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=199486">Poker</a></td>
                                <td width="60" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headerviolet')" class="nmsw_headerviolet_org" style="border-right-width:1; border-bottom-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-bottom-style:none; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=320195">Spécialités maison</a></td>
                                <td width="35" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headerviolet')" class="nmsw_headerviolet_org" style="border-right-width:1; border-bottom-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-bottom-style:none; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=173143">Casse têtes</a></td>
                                <td width="33" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headerviolet')" class="nmsw_headerviolet_org" style="border-right-width:1; border-bottom-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-bottom-style:none; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=170153">Magie</a></td>
                                <td width="77" OnMouseOut="namosw_cell_rollout(this)" OnMouseOver="namosw_cell_rollover(this, 'nmsw_headerviolet')" class="nmsw_headerviolet_org" style="border-right-width:1; border-bottom-width:1; border-left-width:1; border-right-color:rgb(153,153,153); border-left-color:rgb(153,153,153); border-right-style:solid; border-bottom-style:none; border-left-style:solid;"><a href="PBSCCatalog.asp?CatID=207415">Destockage Promotions</a></td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<p>&nbsp;</p>
</body>

</html>

J'ai essayé plusieurs outils en ligne afin de convertir ce code, que j'ai ensuite enregistré et hebergé sur mon site en .js
J'ai ensuite inséré la balise: <script src="Files/20482/header1.js" type="text/javascript"></script> dans la balise HEAD du site en question et la ..................... rien!!


Je cherche encore et encore, des tutos, explications de base sur le JS. J'en dors plus, mange plus, aidez moi svp

Comment je peux faire de ce menu un fichier .js fonctionnel?
Merci a tous ceux qui pourraient m'aider
mardi 3 juin 2008 à 22:01:31 | Re : Newbie total a besoin d'aide pour inserer menu vertical (html) en JavaScript

PetoleTeam

Membre Club
Réponse acceptée !
Bonjour,
dans ton fichier Files/20482/header1.js
supprime les lignes 1 et 2
<script language="JavaScript" type="text/javascript">
<!--

et les lignes 118 et 119
/ /-->
</script>

ce balisage n'a pas de raison d'être dans un fichier.js
Sinon regarde la console d'erreur sous FireFox notamment, elle est riche d'enseignement...
voila pour un début...
;O)
mardi 3 juin 2008 à 23:08:41 | Re : Newbie total a besoin d'aide pour inserer menu vertical (html) en JavaScript

lhawai1

Un grand, mais alors tres grand merci! Ca fonctionne!!!!!
Je crois que le Javascript va changer ma vie...
mercredi 4 juin 2008 à 06:18:38 | Re : Newbie total a besoin d'aide pour inserer menu vertical (html) en JavaScript

nicomilville

Membre Club
Salut,

Dans ce cas si la solution que t'a fournis PetoleTeam marche il serait bien que tu le mette en réponse accèpté...

a++

Si la réponse vous convient, pensez : Réponse accepté !



Cette discussion est classée dans : menu, font, jeux, color, cell


Répondre à ce message

Sujets en rapport avec ce message

Déroulement menu css et javascript [ par kristale ] Hello! j'ai un petit soucis avec mon menu déroulant. J'aimerai que les sous menus ne disparaissent pas quand on clique dessus, mais qu'ils restent.Et integrer image arriere plan dans menu CSS [ par ju0123456789 ] Bonjour,je viens de mettre en place un menu avec sous menu, et mon probleme est que je voudrais integrer une image d'arriere plan, mais soit ce n'est  Menu glissant sous html ne fonctionne pas sous DOCTYPE XHTML [ par michof ] Bonjour,J'ai construit un petit menu glissant tout simple en CSS et javascript qui fonctionne très bien en HTML, mais sous XHTML il bloque. Le menu es Conflit OnMouseOut et OnClick [ par rehtakulveets ] Bonjour à tous. Je sais que le sujet a déjà été traité mais mon problème est un peu différent et je n'arrive pas à m'en sortir. J'ai récupéré un code mon menu et toujour ouver php/mysql/javacript [ par ramirez21000 ] je veut que mon menu soit fermer  et on clicon ou onmousover les sous menu apparesstvoila mon travail************************************************* Garder ouvert un menu accordeon [ par AlexFaitDesChoses ] Bonjour à tous, je débute en PHP et j'aimerais quelques conseils. Je suis entrain de créer mon nouveau site qui se compose comme ceci: un menu déroula problème de position d'une image lors du survol d'un lien [ par molio ] Bonjour, J'essaie de faire un site internet pour mon laboratoire. je souhaite faire apparaitre une image qui suit la souris au survol d'un lien vers problème avec jQuery jqGalScroll [ par guignia65 ] Bonjour, je suis juste amateur et j'essaie de faire un site avec dans ma page "jQuery jqGalScroll". J'ai essayé de modifier un code récupéré sur le ne Lien et checkbox [ par imen99 ] Hi J'ai ce code et je veux ajouter des checkbox devant chaque lien et que les liens ne fonctionne qu'aprés avoir séléctionner un checkbox et probléme de compatibilité avec le navigateur [ par ivvymata ] Bonjour,j'ai un problème avec le navigateur, en fait je suis entrain de créer le site de notre société, tout marche bien avec mozilla firefox, mais qu


Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,250 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales