Bonjour.
J'avais quelques scripts qui figuraient sur toutes mes pages.
Je me disais que ce serait plus efficace si je mettais tous ces scripts dans un fichier .js Cependant, après avoir fait le trasfert, ceci ne marhe plus. Tout fonctionnait très bien individuellement. Voici le script que j'ai mis dans mon .js
J'ai vraiment besoin de votre aide, je ne suis pas très bon en javascript. Je vous serais très reconnaissant. Merci d'avance.
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 //<![CDATA[ **************** Refaire les frames et mettre printer friendly if (this.window.name=="printer"){ document.write('<div align="center"><p class="H1">'+document.title+'<\/p><p class="hidden"> This is a printer friendly page. Please close this window to return to the Blue Dance web page.<br><\/div>'); } if (this.window.name=="map"){} else if (parent.frames.length < 1){ document.write('<div align="center"><b><font color="black" size="4">You have acessed this page without visiting the main frame. You will not have access to the whole web page unless you visit the Blue Dance home page.<\/font><\/b><b><font color="#000080" size="3"><br \/><a href="..\/..\/index.html">http:\/\/www.bluedance.info<\/a><\/font><\/b><br><\/div>'); document.location.href = 'http:/www.bluedance.info'; } //]]> //<![CDATA[ **************** Pour faire accepter getelementbyid dans les vieux browsers if(!document.getElementById){ if(document.all) document.getElementById=function(){ if(typeof document.all[arguments[0]]!="undefined") return document.all[arguments[0]] else return null } else if(document.layers) document.getElementById=function(){ if(typeof document[arguments[0]]!="undefined") return document[arguments[0]] else return null } } //]]> //<![CDATA[ **************** Montrer ou cacher le menu noir function hide() { document.getelementbyid('menu').style.visibility = "hidden"; { function show() { document.getelementbyid('menu').style.visibility = "visible"; } //]]> //<![CDATA[ **************** Ignorer les erreurs function stoperror() { return true; } window.onerror = stoperror; //<![CDATA[
Partager