bonjours a tous,
je debute en dhtml, j'ai trouvé un script que j'ai envie d'inclure a mon site, mais je n'arive pas a comprendre comment le rendre compatible avec firefox...
quelqu'un aurai t il la solution a mon probleme ?
merci d'avance
bonjours a tous,
je debute en dhtml, j'ai trouvé un script que j'ai envie d'inclure a mon site, mais je n'arive pas a comprendre comment le rendre compatible avec firefox...
quelqu'un aurai t il la solution a mon probleme ?
merci d'avance
Bonjour,
Voila copie coller et essaye le
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129 <SCRIPT LANGUAGE="JavaScript"> <!-- floatX=10; floatY=10; layerwidth=100; layerheight=130; halign="center"; valign="center"; delayspeed=3; // This script is copyright (c) Henrik Petersen, NetKontoret // Feel free to use this script on your own pages as long as you do not change it. // It is illegal to distribute the script as part of a tutorial / script archive. // Updated version available at: http://www.echoecho.com/toolfloatinglayer.htm // This comment and the 4 lines above may not be removed from the code. NS6=false; IE4=(document.all); if (!IE4) {NS6=(document.getElementById);} NS4=(document.layers); function adjust() { if ((NS4) || (NS6)) { if (lastX==-1 || delayspeed==0) { lastX=window.pageXOffset + floatX; lastY=window.pageYOffset + floatY; } else { var dx=Math.abs(window.pageXOffset+floatX-lastX); var dy=Math.abs(window.pageYOffset+floatY-lastY); var d=Math.sqrt(dx*dx+dy*dy); var c=Math.round(d/10); if (window.pageXOffset+floatX>lastX) {lastX=lastX+delayspeed+c;} if (window.pageXOffset+floatX<lastX) {lastX=lastX-delayspeed-c;} if (window.pageYOffset+floatY>lastY) {lastY=lastY+delayspeed+c;} if (window.pageYOffset+floatY<lastY) {lastY=lastY-delayspeed-c;} } if (NS4){ document.layers['floatlayer'].pageX = lastX; document.layers['floatlayer'].pageY = lastY; } if (NS6){ document.getElementById('floatlayer').style.left=lastX; document.getElementById('floatlayer').style.top=lastY; } } else if (IE4){ if (lastX==-1 || delayspeed==0) { lastX=document.body.scrollLeft + floatX; lastY=document.body.scrollTop + floatY; } else { var dx=Math.abs(document.body.scrollLeft+floatX-lastX); var dy=Math.abs(document.body.scrollTop+floatY-lastY); var d=Math.sqrt(dx*dx+dy*dy); var c=Math.round(d/10); if (document.body.scrollLeft+floatX>lastX) {lastX=lastX+delayspeed+c;} if (document.body.scrollLeft+floatX<lastX) {lastX=lastX-delayspeed-c;} if (document.body.scrollTop+floatY>lastY) {lastY=lastY+delayspeed+c;} if (document.body.scrollTop+floatY<lastY) {lastY=lastY-delayspeed-c;} } document.all['floatlayer'].style.posLeft = lastX; document.all['floatlayer'].style.posTop = lastY; } setTimeout('adjust()',50); } function define() { if ((NS4) || (NS6)) { if (halign=="left") {floatX=ifloatX}; if (halign=="right") {floatX=window.innerWidth-ifloatX-layerwidth-20}; if (halign=="center") {floatX=Math.round((window.innerWidth-20)/2)-Math.round(layerwidth/2)}; if (valign=="top") {floatY=ifloatY}; if (valign=="bottom") {floatY=window.innerHeight-ifloatY-layerheight}; if (valign=="center") {floatY=Math.round((window.innerHeight-20)/2)-Math.round(layerheight/2)}; } if (IE4) { if (halign=="left") {floatX=ifloatX}; if (halign=="right") {floatX=document.body.offsetWidth-ifloatX-layerwidth-20} if (halign=="center") {floatX=Math.round((document.body.offsetWidth-20)/2)-Math.round(layerwidth/2)} if (valign=="top") {floatY=ifloatY}; if (valign=="bottom") {floatY=document.body.offsetHeight-ifloatY-layerheight} if (valign=="center") {floatY=Math.round((document.body.offsetHeight-20)/2)-Math.round(layerheight/2)} } } //--> </script> <meta name="generator" content="Namo WebEditor"> <script> if (NS4) {document.write('<LAYER NAME="floatlayer" LEFT="'+floatX+'" TOP="'+floatY+'">');} if ((IE4) || (NS6)) {document.write('<div id="floatlayer" style="position:absolute; left:'+floatX+'; top:'+floatY+';">');} </script> <p>***** Cest ici que vous pouvez placer ce que vous voulez ***** <script> if (NS4) { document.write('</LAYER>'); } if ((IE4) || (NS6)) { document.write('</DIV>'); } ifloatX=floatX; ifloatY=floatY; define(); window.onresize=define; lastX=-1; lastY=-1; adjust(); </script> </p> <-- a effacer les BR --> <br><br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br>
merci beaucoup !!!!!!!
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager