Navigateur et menu vertical [Résolu]

Signaler
Messages postés
2
Date d'inscription
lundi 15 août 2005
Statut
Membre
Dernière intervention
19 août 2005
-
Messages postés
2
Date d'inscription
lundi 15 août 2005
Statut
Membre
Dernière intervention
19 août 2005
-
bonjour j ai trouve un petit script sur Internet (merci au createur) qui affiche un lien pour un menu deroulant vertical en haut de ma page. Normalement ce lien est suppose rester en haut de la page meme lorsque l on descend dans la page masi cela ne marche pas avec tt les versions d IE.
Mai mon plus gros probleme est que le menu ne s affiche pas du tout avec Mozilla. Impossible d ouvrir le meu en clickant sur l'image. Si quelqu un pouvez m aider. Suis une grande debutante en java script et ne sait pas du tout pourquoi

merci beaucoup

voici le script

<style type="text/css">
<!--


#master {position:absolute; width: 200px; top: 10px; left: -150px; z-index:2; visibility:visible;}
#menu {position:absolute; width: 18px; top: 0px; left: 150px; z-index:5; visibility:visible;}
#top {position:absolute; width: 150px; top: 0px; left: 0px; z-index:5; visibility:visible;}
#screen {position:absolute; width: 150px; top: 6px; left: 0px; z-index:5; visibility:visible;}
#screenlinks {position:absolute; width: 150px; top: 6px; left: 0px; z-index:5; visibility:visible;}


-->
</style>
<style type="text/css">
<!--


.NavJump {font-family: arial; font-size: 12pt; color: #015B92; text-decoration: none;}
a:link.NavJump {color : #015B92;}
a:visited.NavJump {color : #015B92;}
a:active.NavJump {text-decoration: none; color: #D2EEFF;}
a:hover.NavJump {text-decoration: none; color: #D2EEFF;}


-->
</style>
<script language = "javascript">
<!--


var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0


if(ie){
document.write('<style type="text/css">')
document.write("#screen {filter:Alpha(Opacity=30);}")
document.write("</style>")
}


if(ns){
document.write('<style type="text/css">')
document.write("#master {clip:rect(0,150,250,0);}")
document.write("</style>")
}


//-->
</script>
<script language = "javascript">
<!--



var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0



var master = new Object("element")master.curLeft -150; master.curTop 10;master.gapLeft 0; master.gapTop 0;
master.timer = null;


function moveAlong(layerName, paceLeft, paceTop, fromLeft, fromTop){
clearTimeout(eval(layerName).timer)


if(eval(layerName).curLeft != fromLeft){
if((Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft)) < paceLeft){eval(layerName).curLeft = fromLeft}
else if(eval(layerName).curLeft < fromLeft){eval(layerName).curLeft = eval(layerName).curLeft + paceLeft}
else if(eval(layerName).curLeft > fromLeft){eval(layerName).curLeft = eval(layerName).curLeft - paceLeft}
if(ie){document.all[layerName].style.left = eval(layerName).curLeft}
if(ns){document[layerName].left = eval(layerName).curLeft}
}


if(eval(layerName).curTop != fromTop){
if((Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop)) < paceTop){eval(layerName).curTop = fromTop}
else if(eval(layerName).curTop < fromTop){eval(layerName).curTop = eval(layerName).curTop + paceTop}
else if(eval(layerName).curTop > fromTop){eval(layerName).curTop = eval(layerName).curTop - paceTop}
if(ie){document.all[layerName].style.top = eval(layerName).curTop}
if(ns){document[layerName].top = eval(layerName).curTop}
}



eval(layerName).timer=setTimeout('moveAlong("'+layerName+'",'+paceLeft+','+paceTop+','+fromLeft+','+fromTop+')',30)
}


function setPace(layerName, fromLeft, fromTop, motionSpeed){
eval(layerName).gapLeft = (Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft))/motionSpeed
eval(layerName).gapTop = (Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop))/motionSpeed


moveAlong(layerName, eval(layerName).gapLeft, eval(layerName).gapTop, fromLeft, fromTop)
}



var expandState = 0


function expand(){if(expandState 0){setPace("master", 0, 10, 10); if(ie){document.menutop.src "menub.gif"}; expandState = 1;}else{setPace("master", -150, 10, 10); if(ie){document.menutop.src "menu.gif"}; expandState 0;}
}



//-->
</script>











<table border="0" width="100%" bgcolor="#015B92" cellspacing="0" cellpadding="0">
----,

<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"5\">
----


</td></tr>
</table>


</td></tr>
</table>



<table border="0" width="100%" bgcolor="#015B92" cellspacing="0" cellpadding="0">
----,

<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"5\">
----
- Presentation

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Objective

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prerequisite

- LS Origin

- LS Models

- Main models

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kolb's model

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;H&M's model

- Examples

- Evaluation

- Further Read


</td></tr>
</table>


</td></tr>
</table>




<script language = "javascript">
<!--



if(ie){var sidemenu = document.all.master;}
if(ns){var sidemenu = document.master;}


function FixY(){
if(ie){sidemenu.style.top = document.body.scrollTop+10}
if(ns){sidemenu.top = window.pageYOffset+10}
}



setInterval("FixY()",100);


//-->
</script>

2 réponses

Messages postés
289
Date d'inscription
vendredi 11 mars 2005
Statut
Membre
Dernière intervention
3 avril 2008
3
Salut!

J'ai fait quelques modification pour qu'il soit compatible FF et les plus récent navigateur.

A+, Ghislain


<style
type= "
text/
css">
<!--

#
master
{ position:absolute;
width:
200px;
top:
10px;
left: -
150px;
z-
index:2;
visibility:visible;}
#
menu
{position:absolute;
width:
18px;
top:
0px;
left:
150px;
z-
index:5;
visibility:visible;}
#
top
{position:absolute;
width:
150px;
top:
0px;
left:
0px;
z-
index:5;
visibility:visible;}
#
screen
{position:absolute;
width:
150px;
top:
6px;
left:
0px;
z-
index:5;
visibility:visible;}
#
screenlinks
{position:absolute;
width:
150px;
top:
6px;
left:
0px;
z-
index:5;
visibility:visible;}

-->

</style>

<style
type ="
text/
css">
<!--

.NavJump
{font-
family:
arial;
font-
size:
12pt;
color:
#015B92;
text-
decoration:
none;}

a:
link.NavJump
{color
:
#015B92;}

a:
visited.NavJump
{color
:
#015B92;}

a:
active.NavJump
{text-
decoration:
none;
color:
#D2EEFF;}

a:
hover.NavJump
{text-
decoration:
none;
color:
#D2EEFF;}

-->

</style>

<script language = "javascript">
<!--

var ie
= document
.getElementById ?
1
:
0

var ns
= document
.layers ?
1
:
0

if(ie
){
document
.write
('
<style type
= "text/css">'
)
document
.write
("#screen {filter:Alpha(Opacity=30);}")
document
.write
("</style>")

}

if(ns
){
document
.write
('
<style type
="text/css">'
)
document
.write
("#master {clip:rect(0,150,250,0);}")
document
.write
("</style>")

}

//-->
</script>

<script language = "javascript">
<!--

var ie
= document
.getElementById ?
1
:
0

var ns
= document
.layers ?
1
:
0

var master
=
new Object
("element")
master
.curLeft
=
-150; master
.curTop
=
10;
master
.gapLeft
=
0; master
.gapTop
=
0;
master
.timer
=
null;

function moveAlong
(layerName
, paceLeft
, paceTop
, fromLeft
, fromTop
) {
clearTimeout
(eval
(layerName
).timer
)

if(eval
(layerName
).curLeft
! = fromLeft
){

if((Math
.max
(eval
(layerName
).curLeft
, fromLeft
)
- Math
.min
(eval
(layerName
).curLeft
, fromLeft
))
< paceLeft
){eval
(layerName
).curLeft
= fromLeft
}

else
if(eval
(layerName
).curLeft
< fromLeft
){eval
(layerName
).curLeft
= eval
(layerName
).curLeft
+ paceLeft
}

else
if(eval
(layerName
).curLeft
> fromLeft
){eval
(layerName
).curLeft
= eval
(layerName
).curLeft
- paceLeft
}

if(ie
){document
.getElementById
(layerName
).style
.left
= eval
(layerName
).curLeft
}

if(ns
){document
[layerName
].left
= eval
(layerName
).curLeft
}

}

if(eval
(layerName
).curTop
! = fromTop
){

if((Math
.max
(eval
(layerName
).curTop
, fromTop
)
- Math
.min
(eval
(layerName
).curTop
, fromTop
))
< paceTop
){eval
(layerName
).curTop
= fromTop
}

else
if(eval
(layerName
).curTop
< fromTop
){eval
(layerName
).curTop
= eval
(layerName
).curTop
+ paceTop
}

else
if(eval
(layerName
).curTop
> fromTop
){eval
(layerName
).curTop
= eval
(layerName
).curTop
- paceTop
}

if(ie
){document
.getElementById
(layerName
).style
.top
= eval
(layerName
).curTop
}

if(ns
){document
[layerName
].top
= eval
(layerName
).curTop
}

}

eval
(layerName
).timer
=setTimeout
('moveAlong
("'+layerName+'",'
+paceLeft
+'
,'
+paceTop
+'
,'
+fromLeft
+'
,'
+fromTop
+'
)'
,30)

}

function setPace
(layerName
, fromLeft
, fromTop
, motionSpeed
){
eval
(layerName
).gapLeft
=
(Math
.max
(eval
(layerName
).curLeft
, fromLeft
)
- Math
.min
(eval
(layerName
).curLeft
, fromLeft
))/motionSpeed
eval
(layerName
).gapTop
=
(Math
.max
(eval
(layerName
).curTop
, fromTop
)
- Math
.min
(eval
(layerName
).curTop
, fromTop
))/motionSpeed

moveAlong
(layerName
, eval
(layerName
).gapLeft
, eval
(layerName
).gapTop
, fromLeft
, fromTop
)

}

var expandState
=
0

function expand
(){

if(expandState

0) { setPace
("master",
0,
10,
10);
if(ie
){document
.menutop
.src "menub.gif"<gras>}; expandState </gras>
1;
}

else{setPace
("master",
-150,
10,
10);
if(ie
){document
.menutop
.src "menu.gif"<gras>}; expandState </gras>
0;
}

}

//-->
</script>

"master">

"menu">

border =
\"0\"
width=
\"18\"
cellspacing=
\"0\"
cellpadding=
\"0\">

----
width=
"100%">,

"top">

border=
\"0\"
width=
\"150\"
cellspacing=
\"0\"
cellpadding=
\"0\">

----
width=
"100%">,

"screen">

border=
\"0\"
width=
\"150\"
cellspacing=
\"0\"
cellpadding=
\"5\">

----
width=
"100%"
bgcolor=
"#015B92">

<table
border=
"0"
width=
"100%"
bgcolor=
"#015B92"
cellspacing=
"0"
cellpadding=
"0">

----, width=
\"100%\">

<table
border=
\"0\"
width=
\"100%\"
cellspacing=
\"1\"
cellpadding=
\"5\">

----
width=
"100%"
bgcolor=
"#FFFFFF">

"NavJump">

"NavJump">

"NavJump">

"NavJump">

"NavJump">

"NavJump">

"NavJump">

"NavJump">

,

</td></tr>

</table>

</td></tr>

</table>

"screenlinks">

border=
\"0\"
width=
\"150\"
cellspacing=
\"0\"
cellpadding=
\"5\">

----
width=
"100%">

<table
border=
"0"
width=
"100%"
bgcolor=
"#015B92"
cellspacing=
"0"
cellpadding=
"0">

----, width=
\"100%\">

<table
border=
\"0\"
width=
\"100%\"
cellspacing=
\"1\"
cellpadding=
\"5\">

----
width=
"100%"
bgcolor=
"#FFFFFF">

- Presentation

&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;Objective

&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;Prerequisite

- LS Origin

- LS Models

- Main models

&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;Kolb's model

&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;H
&M's model

- Examples

- Evaluation

- Further Read

,

</td></tr>

</table>

</td></tr>

</table>

<script language = "javascript">
<!--

if(ie
) { var sidemenu
= document
.getElementById
("master");
}

if(ns
){var sidemenu
= document
.master;
}

function FixY
(){

if(ie
){sidemenu
.style
.top
= document
.body
.scrollTop
+10}

if(ns
){sidemenu
.top
= window
.pageYOffset
+10}

}

setInterval
("FixY()",100);

//-->
</script>
Messages postés
2
Date d'inscription
lundi 15 août 2005
Statut
Membre
Dernière intervention
19 août 2005

Merci beaucoup

ca marche super bien