L'éditeur JavaScript
Visiteur non-identifié | Identifiez-vous | Devenir membre
Code perdu ? | Combien de visiteurs sur votre site ?
Rechercher :
Page d'accueil
     Home Page

JavaScript
     Tous les scripts
     Proposer un script
     Recherche de script
     AJAX
     Cours de JavaScript
     Liste de discussion
     Forums

Services :
     CountUs
     myCircle
     ClickInText
     XooIt

Trucs et astuces :
     HTML / CSS
     PHP / MySQL
     Réferencement
     Graph / Présentation
     Toutes les astuces
     Ajouter un article

MailingList :
122616 abonnés

Annuaire webmaster :      Hebergement web
     Referencement
     Sites webmasters
     XHTML - CSS2
     PHP
     Affiliation - Pub
     FAI

     Annuaire webmaster

Ressources pour webmasters :
     Kit graphique
     Foire aux questions
     Les membres
     Devenir annonceur
     Faire un lien
     Contact

Partenaire :
     Compteur live
     Créer un forum
     Le PHP facile
     Comscripts
     Liens sponsorisés
     Blog
     Page Rank
     Gifs animés, f...
     Poésie et cita...
     Azote.org - no...
     Easy-script.com
     Web creation ...
     Je crée mon site
     Outils de créa...
     Electroniq...
     K i s s design
     Créer son site...
     Les autres
     Votre site ici ?


Le forum ] [ Préférences ] [ Nouveau sujet ] [ Répondre ] [ Recherche ] [ Vos sujets ] [ Tous lus ] [ Flux RSS ]


[ Forums >> JavaScript >> Problèmes avec un script de l'éditeur JavaScript ? >> MENU DYNAMIQUE: relative vers absolue.... ]

> MENU DYNAMIQUE: relative vers absolue....
[ Posté par zedj1 ] [ Détails ] [ Contact ] [ Citer ]
[ Posté le 10-02-2004 à 13:23 | 5 messages ]

bonjour, j'ai utilisé le menu dynamique vertical de l'éditeur javascript mais impossible de le retranscrire de position relative (par rapport à un x et un Y) en position absolue ( à l'inntérieur d'un tableau par exemple) Can U help me ?!?

.: LE CODE :.

<SCRIPT LANGUAGE=JavaScript>
if(document.getElementById)
document.write('<DIV class=poppervert id=topdeckvert></DIV>');
</SCRIPT>
<SCRIPT LANGUAGE=JavaScript>
if (screen.width == 640)
{
posYmenu = 211
posXmenu = 7
}
if (screen.width == 800)
{
posYmenu = 211
posXmenu = 7
}
if (screen.width == 1024)
{
posYmenu = 211
posXmenu = 119
}
if (screen.width == 1088)
{
posYmenu = 211
posXmenu = 151
}
if (screen.width == 1152)
{
posYmenu = 211
posXmenu = 183
}

if (screen.width == 1280)
{
posYmenu = 211
posXmenu = 247
}
if (screen.width == 1600)
{
posYmenu = 211
posXmenu = 406
}
bgcolor='#FFFFFF';
bgcolor2='#DAE3F4';
document.write('<style type=\"text/css\">');
document.write('.poppervert { POSITION: absolute; VISIBILITY: hidden; z-index:3; }')
document.write('#topgauche { position:absolute; top:'+posYmenu+'px; left:'+posXmenu+'px; z-index:10; }')
document.write('A:hover.ejsmenu {color:#000000; text-decoration:none;}')
document.write('A.ejsmenu {color:#000000; text-decoration:none;}')
document.write('</style>')
document.write('<DIV class=poppervert id=topdeckvert></DIV>');";?>
function pop(msg,pos)
{
sknvert.visibility = "hidden";
sknvert.top = posYmenu+pos;
a=true
var content ="<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#FFFFFF WIDTH=150><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=1>";
pass = 0
while (pass < msg.length)
{
content += "<TR><TD BGCOLOR="+bgcolor+" onMouseOver=\"this.style.background='"+bgcolor2+"'\" onMouseOut=\"this.style.background='"+bgcolor+"'\" HEIGHT=20><FONT SIZE=1 FACE=\"Verdana\">&nbsp;&nbsp;"+msg[pass]+"</FONT></TD></TR>";
pass++;
}
content += "</TABLE></TD></TR></TABLE>";
if (nava)
{
sknvert.document.write(content);
sknvert.document.close();
sknvert.visibility = "visible";
}
else if (dom)
{
document.getElementById("topdeckvert").innerHTML = content;
sknvert.visibility = "visible";
}
else if (iex)
{
document.all("topdeckvert").innerHTML = content;
sknvert.visibility = "visible";
}
}
function kill()
{
sknvert.visibility = "hidden";
zlien = new Array;
zlien[0] = new Array;
zlien[1] = new Array;
zlien[2] = new Array;
zlien[3] = new Array;
zlien[4] = new Array;
zlien[5] = new Array;
zlien[6] = new Array;
zlien[7] = new Array;
zlien[8] = new Array;

zlien[0][0] = '<A HREF="index.php?page=affich&famille1=CMI&Rayon=1" CLASS=ejsmenu>Pour processeurs Intel</A>';
zlien[0][1] = '<A HREF="index.php?page=affich&famille1=CMA&Rayon=1" CLASS=ejsmenu>Pour processeurs AMD</A>';
zlien[3][0] = '<A HREF="index.php?page=affich&famille1=VGA&Rayon=1" CLASS=ejsmenu>Cartes graphiques</A>';
zlien[3][1] = '<A HREF="index.php?page=affich&famille1=VID&Rayon=1" CLASS=ejsmenu>Acquisition Vidéo</A>';
zlien[3][2] = '<A HREF="index.php?page=affich&famille1=TUNER&Rayon=1" CLASS=ejsmenu>Tuners</A>';
zlien[7][0] = '<A HREF="index.php?page=affich&famille1=FCD&Rayon=1" CLASS=ejsmenu>Disquettes & carte mémoires</A>';
zlien[7][1] = '<A HREF="index.php?page=affich&famille1=CD&famille2=DVD&Rayon=1" CLASS=ejsmenu>Lecteurs de Cd & DVD</A>';
zlien[7][2] = '<A HREF="index.php?page=affich&famille1=GCD&Rayon=1" CLASS=ejsmenu>Graveurs de Cd</A>';
zlien[7][3] = '<A HREF="index.php?page=affich&famille1=GDVD&Rayon=1" CLASS=ejsmenu>Graveurs de DVD</A>';
zlien[8][0] = '<A HREF="index.php?page=affich&famille1=HDD&Rayon=1" CLASS=ejsmenu>IDE</A>';
zlien[8][1] = '<A HREF="index.php?page=affich&famille1=HDDS&Rayon=1" CLASS=ejsmenu>SATA</A>';
zlien[8][2] = '<A HREF="index.php?page=affich&famille1=HDDP&Rayon=1" CLASS=ejsmenu>Portables</A>';
zlien[8][3] = '<A HREF="index.php?page=affich&famille1=HHDE&Rayon=1" CLASS=ejsmenu>Externes</A>';
var nava = (document.layers);
var dom = (document.getElementById);
var iex = (document.all);
if (nava) { sknvert = document.topdeckvert }
else if (dom) { sknvert = document.getElementById("topdeckvert").style }
else if (iex) { sknvert = topdeckvert.style }
sknvert.left = posXmenu+99;


document.onclick = kill;
document.write('<DIV ID=topgauche><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#FFFFFF WIDTH=100><TR><TD><TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=100% HEIGHT=25>')
document.write('<TR><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[0],1)" onMouseOut="this.style.background=\''+bgcolor+'\'" HEIGHT=25><A onMouseOver="pop(zlien[0],1)" href="index.php?page=affich&famille1=CMI&famille2=CMA&Rayon=1" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Carte mères</FONT></a></TD></TR>')
document.write('<TR><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[1],26)" onMouseOut="this.style.background=\''+bgcolor+'\'" HEIGHT=25><A onMouseOver="pop(zlien[1],26)" href="index.php?page=affich&famille1=CPU&Rayon=1" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Processeurs</FONT></a></TD></TR>')
document.write('<TR><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[2],51)" onMouseOut="this.style.background=\''+bgcolor+'\'" HEIGHT=25><A onMouseOver="pop(zlien[2],51)" href="index.php?page=affich&famille1=RAM&Rayon=1" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Mémoire</FONT></a></TD></TR>')
document.write('<TR><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[3],76)" onMouseOut="this.style.background=\''+bgcolor+'\'" HEIGHT=25><A onMouseOver="pop(zlien[3],76)" href="index.php?page=affich&famille1=VGA&famille2=VID&famille3=TUNER&Rayon=1" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Vidéo</FONT></a></TD></TR>')
document.write('<TR><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[4],101)" onMouseOut="this.style.background=\''+bgcolor+'\'" HEIGHT=25><A onMouseOver="pop(zlien[4],101)" href="index.php?page=affich&famille1=CF&Rayon=1" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Cartes filles</FONT></a></TD></TR>')
document.write('<TR><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[5],126)" onMouseOut="this.style.background=\''+bgcolor+'\'" HEIGHT=25><A onMouseOver="pop(zlien[5],126)" href="index.php?page=affich&famille1=BOI&Rayon=1" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Boitiers</FONT></a></TD></TR>')
document.write('<TR><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[6],151)" onMouseOut="this.style.background=\''+bgcolor+'\'" HEIGHT=25><A onMouseOver="pop(zlien[6],151)" href="index.php?page=affich&famille1=SON&Rayon=1" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Cartes son</FONT></a></TD></TR>')
document.write('<TR><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[7],176)" onMouseOut="this.style.background=\''+bgcolor+'\'" HEIGHT=25><A onMouseOver="pop(zlien[7],176)" href="index.php?page=affich&famille1=FCD&famille2=CD&famille3=DVD&famille4=GCD&famille5=GDVD&Rayon=1" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Lecteurs</FONT></a></TD></TR>')
document.write('<TR><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[8],201)" onMouseOut="this.style.background=\''+bgcolor+'\'" HEIGHT=25><A onMouseOver="pop(zlien[8],201)" href="index.php?page=affich&famille1=IDE&famille2=HDDS&famille3=HDDP&famille4=HHDE&Rayon=1" CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana">Disques durs</FONT></a></TD></TR>')
document.write('</TABLE></TD></TR></TABLE></DIV>')// JavaScript Document
</script>






Services email :

Vous devez vous identifier pour profiter des services par email du forum.
Le forum ] [ Préférences ] [ Nouveau sujet ] [ Répondre ] [ Recherche ] [ Vos sujets ] [ Tous lus ] [ Flux RSS ]






compteur gratuit
actuellement en ligne

    PUBLICITE



     ANNUAIRE WEBMAST.
Perso.cc
Redirection gratuite avec statistiques, compteurs...
Réservez votre nom de domaine sous la forme :
votresite.fr.vc
votresite.fr.cc
votresite.eu.ma
votresite.us.ma
http://www.perso.cc/
Cat : Redirection
Voir l'annuaire webmaster


     LES SCRIPTS :
78 à éditer
68 à copier/coller
247 des membres
2580 sur le web
>> Tous les scripts

     LES MEMBRES :
65980 membres
4655 comptes CountUs
1842 comptes myCircle

     LES FORUMS :
14 forums
40361 topics
191690 messages
>> Les forums

    SONDAGE

Vous avez un blog ou site classique ?
Un blog
Un site classique
Les deux !
La mini-astuce "Referencement" du jour par krucial
Pour savoir combien de pages de votre site sont indexées dans Google, il vous suffit de taper, dans la boite de recherche du moteur : "site:http://www.votresite.com";.
Proposer votre mini-astuce | Archives des mini-astuces
© 1999-2012 EJS - Tous droits réservés | CNIL N° 844440 | 12/02/2012 23:49:44 | Design by | Gen. en 0.485 sec.