Accueil   |   Forums   |  Offres d'emplois   |  Contact    |   Mon compte   
vendredi 9 janvier 2009 Rechercher :
Déposez votre CV gratuitement sur touslesemplois
 
comparer les prix
» Logiciels
» Jeux vidéos
» Matériel Informatique


» ASP.NET
» ASP
» SQL
» PHP
» JAVASCRIPT
» XML
 


» ACTUALITÉ / DIVERS
» DROIT DE L'INTERNET
» INFOS VIRUS
» PATCHS MICROSOFT
» SÉCURITÉ
» BASES DE DONNÉES
» DOWNLOAD .NET
» LOGITHÈQUE
» SERVICES WEB
» Y SONT FOUS !
» .NET
» ASP
» ASP.NET
» JAVA
» PHP
» XML
» LANGAGE C#
» LANGAGE VB.NET
» UNIX / LINUX
» WINDOWS
» EVÈNEMENTS
» GASP
» MICROSOFT
 


Vous êtes ici : Forums > Langage Javascript / AJAX > 2 Menus Défilants dans une page

2 Menus Défilants dans une page
Bonjour,

j'ai réussi à intégrer un menu défilant sur une page avec le script ci-dessous.
Par contre, je n'arrive pas à en intégrer un deuxième sur la même page.
Quelles sont les variables du script qu'il faut que je renomme?
Merci d'avance
Nicolas


<script language="JavaScript1.2">

//configure the below five variables to change the style of the scroller
var scrollerwidth=250
var scrollerheight=90
var scrollerbgcolor='lightyellow'
//set below to '' if you don't wish to use a background image
var scrollerbackground=''

//configure the below variable to change the contents of the scroller
var messages=new Array()


messages[0]='<table width="250" border="0" cellpadding="4" align="right" cellspacing="0"><tr><td class="bleu_11" width="250" bgcolor="#FFffff" height="90" valign="top"><div align="center"><p><b class="texte0"></b></font><p><font class=bleu_12><B>Grandes Enseignes</B><BR><BR></font><font class=bleu_11>938 interviewés<BR>Mars 2003</p><P><IMG SRC="images/carrebleuclair.gif"> <A HREF="result.php?N=241"><B>cliquez ici</B></A> <IMG SRC="images/carrebleuclair.gif"></p></div></td> </tr></table>'
messages[1]='<table width="250" border="0" cellpadding="4" align="right" cellspacing="0"><tr><td class="bleu_11" width="250" bgcolor="#FFffff" height="90" valign="top"><div align="center"><p><b class="texte1"></b></font><p><font class=bleu_12><B>Changer de job ?</B><BR><BR></font><font class=bleu_11>609 interviewés<BR>Février 2003</p><P><IMG SRC="images/carrebleuclair.gif"> <A HREF="result.php?N=245"><B>cliquez ici</B></A> <IMG SRC="images/carrebleuclair.gif"></p></div></td> </tr></table>'
messages[2]='<table width="250" border="0" cellpadding="4" align="right" cellspacing="0"><tr><td class="bleu_11" width="250" bgcolor="#FFffff" height="90" valign="top"><div align="center"><p><b class="texte2"></b></font><p><font class=bleu_12><B>Gîtes d\'étapes et de séjours</B><BR><BR></font><font class=bleu_11>1 553 interviewés<BR>Janvier 2003</p><P><img src="images/carrebleuclair.gif"> <A HREF="result.php?N=236"><B>cliquez ici</B></A> <img src="images/carrebleuclair.gif"></p></div></td> </tr></table>'
messages[3]='<table width="250" border="0" cellpadding="4" align="right" cellspacing="0"><tr><td class="bleu_11" width="250" bgcolor="#FFffff" height="90" valign="top"><div align="center"><p><b class="texte3"></b></font><p><font class=bleu_12><B>Restaurant - Spectacles</B><BR><BR></font><font class=bleu_11>1 590 interviewés<BR>Décembre 2002</p><P><img src="images/carrebleuclair.gif"> <A HREF="result.php?N=234"><B>cliquez ici</B></A> <img src="images/carrebleuclair.gif"></p></div></td> </tr></table>'
messages[4]='<table width="250" border="0" cellpadding="4" align="right" cellspacing="0"><tr><td class="bleu_11" width="250" bgcolor="#FFffff" height="90" valign="top"><div align="center"><p><b class="texte4"></b></font><p><font class=bleu_12><B>Produits Artisanaux</B><BR><BR></font><font class=bleu_11>2 712 interviewés<BR>Décembre 2002</p><P><IMG SRC="images/carrebleuclair.gif"> <A HREF="result.php?N=235"><B>cliquez ici</B></A> <IMG SRC="images/carrebleuclair.gif"></p></div></td> </tr></table>'
messages[5]='<table width="250" border="0" cellpadding="4" align="right" cellspacing="0"><tr><td class="bleu_11" width="250" bgcolor="#FFffff" height="90" valign="top"><div align="center"><p><b class="texte5"></b></font><p><font class=bleu_12><B>Home Cinéma</B><BR><BR></font><font class=bleu_11>2 702 interviewés<BR>Décembre 2002</p><P><img src="images/carrebleuclair.gif"> <A HREF="result.php?N=232"><B>cliquez ici</B></A> <img src="images/carrebleuclair.gif"></p></div></td> </tr></table>'
messages[6]='<table width="250" border="0" cellpadding="4" align="right" cellspacing="0"><tr><td class="bleu_11" width="250" bgcolor="#FFffff" height="90" valign="top"><div align="center"><p><b class="texte6"></b></font><p><font class=bleu_12><B>Restauration de Type Rapide</B><BR><BR></font><font class=bleu_11>1 270 interviewés<BR>Novembre 2002</p><P><IMG SRC="images/carrebleuclair.gif"> <A HREF="result.php?N=223"><B>cliquez ici</B></A> <IMG SRC="images/carrebleuclair.gif"></p></div></td> </tr></table>'
messages[7]='<table width="250" border="0" cellpadding="4" align="right" cellspacing="0"><tr><td class="bleu_11" width="250" bgcolor="#FFffff" height="90" valign="top"><div align="center"><p><b class="texte7"></b></font><p><font class=bleu_12><B>Impact du Passage à l Euro</B><BR><BR></font><font class=bleu_11>1 922 interviewés<BR>Novembre 2002</p><P><IMG SRC="images/carrebleuclair.gif"> <A HREF="result.php?N=226"><B>cliquez ici</B></A> <IMG SRC="images/carrebleuclair.gif"></p></div></td> </tr></table>'
messages[8]='<table width="250" border="0" cellpadding="4" align="right" cellspacing="0"><tr><td class="bleu_11" width="250" bgcolor="#FFffff" height="90" valign="top"><div align="center"><p><b class="texte8"></b></font><p><font class=bleu_12><B>Agence matrimoniale</B><BR><BR></font><font class=bleu_11>1 003 interviewés<BR>Juillet 2002</p><P><IMG SRC="images/carrebleuclair.gif"> <A HREF="result.php?N=198"><B>cliquez ici</B></A> <IMG SRC="images/carrebleuclair.gif"></p></div></td> </tr></table>'



///////Do not edit pass this line///////////////////////

if (messages.length>1)
i=2
else
i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",3000)
setTimeout("move2(document.main.document.second)",3000)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",100)
}
else{
tlayer.top=scrollerheight
tlayer.document.write(messages[i])
tlayer.document.close()
if (i==messages.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",3000)
setTimeout("move1(document.main.document.first)",3000)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",100)
}
else{
tlayer2.top=scrollerheight
tlayer2.document.write(messages[i])
tlayer2.document.close()
if (i==messages.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){
tdiv.style.pixelTop=0
setTimeout("move3(tdiv)",3000)
setTimeout("move4(second2)",3000)
return
}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=5
setTimeout("move3(tdiv)",100)
}
else{
tdiv.style.pixelTop=scrollerheight
tdiv.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
tdiv2.style.pixelTop=0
setTimeout("move4(tdiv2)",3000)
setTimeout("move3(first2)",3000)
return
}
if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=5
setTimeout("move4(second2)",100)
}
else{
tdiv2.style.pixelTop=scrollerheight
tdiv2.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}

function startscroll(){
if (document.all){
move3(first2)
second2.style.top=scrollerheight
second2.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=scrollerheight+5
document.main.document.second.visibility='show'
}
}

window.onload=startscroll

</script>














Message posté le 11/06/2003 par Nicolas

Répondre à ce message
 


Project Hoshimi


A RETENIR CETTE SEMAINE
08/01/2009 - Les markup extensions en WPF
Ce tutoriel présente le concept des markup extensions, qui permettent d'enrichir la syntaxe du langa ...
08/01/2009 - Utiliser un MOSS 2007 Search avec SPS 2003
Microsoft Office SharePoint Server 2007 (MOSS) fournit de nombreuses fonctionnalités qui ne sont pas ...
07/01/2009 - SharePoint et les technologies 3.5 : utilisation de l'AJAX dans les webparts
Le train technologique poursuivant sa course effreinée, voici un tutoriel qui se décline en plusieur ...
07/01/2009 - Windows Seven : commercialisation fin de l'année ?
Alors que la version bêta de Windows Seven devrait officiellement être lancée à la mi-janvier, le pr ...
07/01/2009 - SharpDevelop 3.0 proche d'une release
SharpDevelop est un IDE gratuit qu'on a tendance à oublier comparé à la gamme Express de Microsoft. ...
06/01/2009 - Comment appeler Biztalk via un Web Service ?
Souvent les exemples Biztalk prennent en entrée des fichiers qui sont ensuite consommés avant d’être ...
06/01/2009 - TechDays - Téléchargez les goodies officiels
Si vous ne les avez pas encore téléchargés, il est encore temps : les goodies officiels des TechDays ...
(c) 1999-2006 ASP MAGAZINE SARL
Partenaires : Codes sources c2i ASP-PHP
Hébergement serveurs dédiés Windows


Hit-Parade