ERREUR 500 causé par un fichier javascript
Résolu
CH4NCE
Messages postés
619
Date d'inscription
Statut
Membre
Dernière intervention
-
CH4NCE Messages postés 619 Date d'inscription Statut Membre Dernière intervention -
CH4NCE Messages postés 619 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
j'ai un soucis avec un fichier javascript.
Ce fichier est appelé dans l'entete de la page html, cela fonctionne très bien sur mon serveur en local, chez l'hebergeur ou le site a été développé, mais pas chez l'hebergeur ou a été porté le site.
Au lieu d'envoyer le script au navigateur, le serveur rencontre une erreur interne de type 500.
J'ai demandé a l'hebergeur de m'envoyer les erreurs contenus dans les logs mais ça traine et ça fait 2 jours que je galère.
Voici le fichier en question, d'apres mes tests et recherches le probleme vient bien de lui :s
Si quelqu'un a une idée ben c'est chouette.
Je ferais de gros bisous a ceux qui voudrons bien jeter un oeil. Merci :)
// JavaScript Document
var scroller_width='240px'
var scroller_height='330px'
var bgcolor='#FFFF66'
var pause=6000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
var border=''
var scrollercontent=new Array()
//Define scroller contents. Extend or contract array as needed
scrollercontent[0]='<div class="scroll"><img src="photo/diapo/nos_ran1.png" alt="test" width="150" height="200" align="bottom" /><p>verre laqué blanc coulissant</p></div><!--end scroll-->\r'
scrollercontent[1]='<div class="scroll"><img src="photo/diapo/nos_ran2.png" alt="" width="150" height="200" align="bottom" /><p>Dressing décor hétre clair</p></div><!--end photo2-->\r'
scrollercontent[2]='<div class="scroll"><img src="photo/diapo/nos_ran3.png" alt="" width="150" height="200" align="bottom" /><p>bloc 4 tiroirs de dressing</p></div><!--end photo3-->\r'
scrollercontent[3]='<div class="scroll"><img src="photo/diapo/nos_ran4.png" alt="" width="200" height="150" align="bottom" /><p>Meuble bibliothéque</p></div><!--end photo4-->\r'
scrollercontent[4]='<div class="scroll"><img src="photo/diapo/nos_ran5.png" alt="" width="200" height="150" align="bottom" /><p>aménagement sous combles</p></div><!--end photo5-->\r'
////NO need to edit beyond here/////////////
var ie4=document.all
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
if (ie4||dom)
//style du diapo, positionnement
document.write('<div style="position:absolute;left:50%;margin-left:250px;top:230px;width:'+scroller_width+';height:'+scroller_height+';overflow:hidden">'
+'<div id="canvas0" style="position:absolute;background-color:'+bgcolor+';width:'+scroller_width+';'+border+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div>'
+'<div id="canvas1" style="position:absolute;background-color:'+bgcolor+';'+border+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>')
else if (document.layers){
document.write('<ilayer id=tickernsmain visibility=hide width='+scroller_width+' height='+scroller_height+' bgColor='+bgcolor+'><layer id=tickernssub width='+scroller_width+' height='+scroller_height+' left=0 top=0>'+scrollercontent[0]+'</layer></ilayer>')
}
var curpos=scroller_height*(1)
var degree=10
var curcanvas="canvas0"
var curindex=0
var nextindex=1
function moveslide(){
if (curpos>0){
curpos=Math.max(curpos-degree,0)
tempobj.style.top=curpos+"px"
}
else{
clearInterval(dropslide)
if (crossobj.filters)
crossobj.filters.alpha.opacity=100
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=1
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML=scrollercontent[curindex]
nextindex=(nextindex<scrollercontent.length-1)? nextindex+1 : 0
setTimeout("rotateslide()",pause)
}
}
function rotateslide(){
if (ie4||dom){
resetit(curcanvas)
crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.style.zIndex++
if (crossobj.filters)
document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20
else if (crossobj.style.MozOpacity)
document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas1").style.MozOpacity=0.2
var temp='setInterval("moveslide()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else if (document.layers){
crossobj.document.write(scrollercontent[curindex])
crossobj.document.close()
}
curindex=(curindex<scrollercontent.length-1)? curindex+1 : 0
}
function resetit(what){
curpos=parseInt(scroller_height)*(1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.top=curpos+"px"
}
function startit(){
crossobj=ie4? eval("document.all."+curcanvas) : dom? document.getElementById(curcanvas) : document.tickernsmain.document.tickernssub
if (ie4||dom){
crossobj.innerHTML=scrollercontent[curindex]
rotateslide()
}
else{
document.tickernsmain.visibility='show'
curindex++
setInterval("rotateslide()",pause)
}
}
if (ie4||dom||document.layers)
window.onload=startit
--
c'est dur a faire une signature ;)
j'ai un soucis avec un fichier javascript.
Ce fichier est appelé dans l'entete de la page html, cela fonctionne très bien sur mon serveur en local, chez l'hebergeur ou le site a été développé, mais pas chez l'hebergeur ou a été porté le site.
Au lieu d'envoyer le script au navigateur, le serveur rencontre une erreur interne de type 500.
J'ai demandé a l'hebergeur de m'envoyer les erreurs contenus dans les logs mais ça traine et ça fait 2 jours que je galère.
Voici le fichier en question, d'apres mes tests et recherches le probleme vient bien de lui :s
Si quelqu'un a une idée ben c'est chouette.
Je ferais de gros bisous a ceux qui voudrons bien jeter un oeil. Merci :)
// JavaScript Document
var scroller_width='240px'
var scroller_height='330px'
var bgcolor='#FFFF66'
var pause=6000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
var border=''
var scrollercontent=new Array()
//Define scroller contents. Extend or contract array as needed
scrollercontent[0]='<div class="scroll"><img src="photo/diapo/nos_ran1.png" alt="test" width="150" height="200" align="bottom" /><p>verre laqué blanc coulissant</p></div><!--end scroll-->\r'
scrollercontent[1]='<div class="scroll"><img src="photo/diapo/nos_ran2.png" alt="" width="150" height="200" align="bottom" /><p>Dressing décor hétre clair</p></div><!--end photo2-->\r'
scrollercontent[2]='<div class="scroll"><img src="photo/diapo/nos_ran3.png" alt="" width="150" height="200" align="bottom" /><p>bloc 4 tiroirs de dressing</p></div><!--end photo3-->\r'
scrollercontent[3]='<div class="scroll"><img src="photo/diapo/nos_ran4.png" alt="" width="200" height="150" align="bottom" /><p>Meuble bibliothéque</p></div><!--end photo4-->\r'
scrollercontent[4]='<div class="scroll"><img src="photo/diapo/nos_ran5.png" alt="" width="200" height="150" align="bottom" /><p>aménagement sous combles</p></div><!--end photo5-->\r'
////NO need to edit beyond here/////////////
var ie4=document.all
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
if (ie4||dom)
//style du diapo, positionnement
document.write('<div style="position:absolute;left:50%;margin-left:250px;top:230px;width:'+scroller_width+';height:'+scroller_height+';overflow:hidden">'
+'<div id="canvas0" style="position:absolute;background-color:'+bgcolor+';width:'+scroller_width+';'+border+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div>'
+'<div id="canvas1" style="position:absolute;background-color:'+bgcolor+';'+border+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>')
else if (document.layers){
document.write('<ilayer id=tickernsmain visibility=hide width='+scroller_width+' height='+scroller_height+' bgColor='+bgcolor+'><layer id=tickernssub width='+scroller_width+' height='+scroller_height+' left=0 top=0>'+scrollercontent[0]+'</layer></ilayer>')
}
var curpos=scroller_height*(1)
var degree=10
var curcanvas="canvas0"
var curindex=0
var nextindex=1
function moveslide(){
if (curpos>0){
curpos=Math.max(curpos-degree,0)
tempobj.style.top=curpos+"px"
}
else{
clearInterval(dropslide)
if (crossobj.filters)
crossobj.filters.alpha.opacity=100
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=1
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML=scrollercontent[curindex]
nextindex=(nextindex<scrollercontent.length-1)? nextindex+1 : 0
setTimeout("rotateslide()",pause)
}
}
function rotateslide(){
if (ie4||dom){
resetit(curcanvas)
crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.style.zIndex++
if (crossobj.filters)
document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20
else if (crossobj.style.MozOpacity)
document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas1").style.MozOpacity=0.2
var temp='setInterval("moveslide()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else if (document.layers){
crossobj.document.write(scrollercontent[curindex])
crossobj.document.close()
}
curindex=(curindex<scrollercontent.length-1)? curindex+1 : 0
}
function resetit(what){
curpos=parseInt(scroller_height)*(1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.top=curpos+"px"
}
function startit(){
crossobj=ie4? eval("document.all."+curcanvas) : dom? document.getElementById(curcanvas) : document.tickernsmain.document.tickernssub
if (ie4||dom){
crossobj.innerHTML=scrollercontent[curindex]
rotateslide()
}
else{
document.tickernsmain.visibility='show'
curindex++
setInterval("rotateslide()",pause)
}
}
if (ie4||dom||document.layers)
window.onload=startit
--
c'est dur a faire une signature ;)
A voir également:
- ERREUR 500 causé par un fichier javascript
- Comment ouvrir un fichier epub ? - Guide
- Fichier bin - Guide
- Erreur 500 - Guide
- Fichier rar - Guide
- Fichier .dat - Guide