Erreur dans mes scripts Javascript
Résolu
jcbrinfo
Messages postés
21
Statut
Membre
-
jcbrinfo Messages postés 21 Statut Membre -
jcbrinfo Messages postés 21 Statut Membre -
Voilà, j'aurais besoin de votre aide pour trouver mon erreur.
Fichiers >
list.htm:
lists.js:
thumbs.js:
theme.css:
Fichier principal > list.htm
Contexte habituel > Dans un frame.
Résultat souaité > une vignette cliquable + un petit texte
Resultat obtenu> Rien.
Erreur affiché avec Console2 > Erreur : Component returned failure code: 0x8007000e (NS_ERROR_OUT_OF_MEMORY) [nsIDOMNSHTMLDocument.write]
Fichier source : list.htm
Ligne : 9
Fichiers >
list.htm:
<html><head> <title></title> <link rel="StyleSheet" href="theme.css" type="text/css" /> <script type="text/javascript" src="thumbs.js"></script> </head><body> <script type="text/javascript" src="lists.js"></script> <script type="text/javascript" language"javascript"> createlist(0); document.write(l);</script></body></html>
lists.js:
function createlist(listid)
{l=new files();
if (listid==0)
{l.nlist(1,'Images');}}
thumbs.js:
selectid='list0';
//Fichier
function file(url,name,thumb,size,cdate,gtype,type,ico,viewf,descrip)
{if(thumb==='')
{thumb='thumbs/default.gif';}
if(size==='')
{size='(inconnue)';}
if(cdate==='')
{cdate='(inconnue)';}
if(gtype==='')
{gtype='none';}
if(type==='')
{type='(inconnu)';}
if(ico==='')
{ico='ico/default.gif';}
if(viewf==='')
{viewf=thumb;}
if(descrip==='')
{descrip='(aucune)';}
this.url=url;
this.name=name;
this.thumb=thumb;
this.size=size;
this.cdate=cdate;
this.gtype=gtype;
this.type=type;
this.ico=ico;
this.viewf=viewf;
this.descrip=descrip;
this._p;}
//Redirection de liste
function list(rlistid,rlname)
{this.rlistid=rlistid;
this.rlname=rlname;
this._p;}
//Liste
function files(listname)
{this.listname=listname;
this.filei=[];
this.listi=[];}
//Ajouter un fichier à la liste
files.prototype.nfile= function (url,name,thumb,size,cdate,gtype,type,ico,viewf,descrip)
{this.filei [this.filei.length]=file(url,name,thumb,cdate,type,ico,viewf,descrip);};
//Ajouter une redirection de liste à la liste
files.prototype.nlist= function (rlistid,rlname)
{this.listi[this.listi.length]=list(rlistid,rlname);};
//Créer le "body"
files.prototype.toString=function()
{var lbody='';
var i=0;
for(i=0;i<this.listi.length;i++)
{lbody+='<div id="list'+i+'" class="thumb0"><center>';
lbody+='<a href="javascrip:iselect(\'list'+i+'\');" ondblclick="parent.toc.afflist='+this.listi[i].rlistid+';parent.toc.d.s('+this.listi[i].rlistid+');createlist('+this.listi[i].rlistid+')"><img src="bfolder.png" width="128" height="128" border="1" name="img'+i+'"></a>';
lbody+=this.listi[i].rlname+'</div>';}
return lbody;};
function iselect(id)
{document.getElementById(selectid).className='thumb0';
selectid=id;
document.getElementById(selectid).className='thumb1';}
theme.css:
a:link
{color: rgb(0,0,200);
text-decoration: none;}
a:hover
{color: rgb(0,128,255);
text-decoration: underline;}
a:visited
{color: rgb(0,0,200);
text-decoration: none;}
a:hover
{color: rgb(0,128,255);
text-decoration: underline;}
a:active
{color: rgb(255,0,0);
text-decoration: none;}
a.s
{color: rgb(0,128,64);
text-decoration: none;
font-weight: bold;
font-size: 10pt;}
a:hover.s
{color: rgb(0,0,255);
text-decoration: underline;
font-weight: bold;
font-size: 10pt;}
a:visited.s
{color: rgb(0,128,64);
text-decoration: none;
font-weight: bold;
font-size: 10pt;}
a:hover.s
{color: rgb(0,0,255);
text-decoration: underline;
font-weight: bold;
font-size: 10pt;}
a:active.s
{color: rgb(128,0,0);
text-decoration: none;
font-weight: bold;
font-size: 10pt;}
body
{color: rgb(0,0,0);
background-color: rgb(255,255,255);
font-family: Arial, Arial, Helvetica;}
h1
{color: rgb(128,128,128);
font-family: Arial, Arial, Helvetica;
font-style: normal;}
h2, marquee
{color: rgb(100,100,100);
font-family: Arial, Arial, Helvetica;
font-style: normal;}
h3
{color: rgb(80,80,80);
font-family: Arial, Arial, Helvetica;
font-style: normal;}
h4
{color: rgb(60,60,60);
font-family: Arial, Arial, Helvetica;
font-style: normal;}
h5
{color: rgb(40,40,40);
font-family: Arial, Arial, Helvetica;
font-style: normal;}
h6
{color: rgb(0,0,0);
font-family: Arial, Arial, Helvetica;
font-style: normal;}
thumbs0
{position:relative;
width:130px;
padding:1px 1px 1px 1px;
background-color:#FFFFFF;
border-color: rgb(0,0,192);
border-width:1px;
border-style:solid;}
thumbs1
{position:relative;
width:130px;
padding:1px 1px 1px 1px;
background-color:#0000FF;
border-color: rgb(0,0,192);
border-width:1px;
border-style:solid;}
Fichier principal > list.htm
Contexte habituel > Dans un frame.
Résultat souaité > une vignette cliquable + un petit texte
Resultat obtenu> Rien.
Erreur affiché avec Console2 > Erreur : Component returned failure code: 0x8007000e (NS_ERROR_OUT_OF_MEMORY) [nsIDOMNSHTMLDocument.write]
Fichier source : list.htm
Ligne : 9
A voir également:
- Erreur dans mes scripts Javascript
- Telecharger javascript - Télécharger - Langages
- Erreur t32 ✓ - Forum Livebox
- Erreur 0x80070643 - Accueil - Windows
- Erreur 4101 france tv - Forum Lecteurs et supports vidéo
- Erreur 4201 france tv ✓ - Forum Réseaux sociaux
Même erreur.