anoniem Geplaatst: 6 november 2004 Delen Geplaatst: 6 november 2004 Ik heb ooit eens een website gemaakt met een leuk omhulsel. Deze website doet het perfect onder IE en ook onder Mozilla tot versie 1.3. Daarna wordt onder Mozilla het script niet meer uitgevoerd vanwege deze error meldingen: [quote:742d8a146c]Error: uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "http://localhost/script/main.js Line: 23"] Error: writeheader is not defined Error: writefooter is not defined[/quote:742d8a146c] Het script en de writeheader en -footer worden op de pagina zo geactiveerd: [quote:742d8a146c]<script language="Javascript" src="script/main.js"></script> <script language="Javascript"> writeheader()</script> <script language="Javascript"> writefooter()</script>[/quote:742d8a146c] Het script [b:742d8a146c]main.js[/b:742d8a146c] wat zorgt voor het omhulsel ziet er zo uit: [code:1:742d8a146c]var weekDay = new Array('zondag','maandag','dinsdag','woensdag','donderdag','vrijdag','zaterdag'); var months = new Array('- 01 -','- 02 -','- 03 -','- 04 -','- 05 -','- 06 -','- 07 -','- 08 -','- 09 -','- 10 -','- 11 -','- 12 -'); var curDate = new Date; var datestring = weekDay[curDate.getDay()] + ', ' + curDate.getDate() + ' ' + months[curDate.getMonth()] + ' 2004 '; var updatestring = top.updatestring; function swapim(name,state){ document.images[name].src='images/' + name + '_' + state + '.gif'; } function openwin(location){ window.open(location,'','directories=no,location=no,scrollbars=no,status=no,toolbar=no,width=400,height=200'); } function location() { window.open('loca.html','','directories=no,location=no,scrollbars=no,status=no,toolbar=no,width=700,height=550'); } function forum() { window.open('http://forum.tweeduister.nl/','','directories=no,location=no,scrollbars=yes,status=yes,toolbar=yes,resizable=yes,width=775,height=500'); } function whitewolf() { window.open('http://www.white-wolf.com/fansites','','directories=no,location=no,scrollbars=yes,status=no,toolbar=no,width=750,height=500'); } function writeheader() { document.writeln('<table cellspacing=0 cellpadding=0 width=750 height=78 border=0 align="center">') document.writeln('<tr>') document.writeln('<td background="images/spec_line.gif" width=105 align="left"><IMG SRC="images/topleft_line.gif" BORDER=0 WIDTH=45 HEIGHT=78></td>') document.writeln('<td width=170 background="images/boxleft.gif" align="right">') document.writeln('<font face="verdana,arial,helvetica" size=1>') document.writeln(datestring) document.writeln('</font>') document.writeln('</td>') document.writeln('<td align="center" valign="top"><IMG SRC="images/logotd.gif" BORDER=0 WIDTH=200 HEIGHT=78 alt="Tweeduister logo door Eric Snelleman"></td>') document.writeln('<td width=170 background="images/boxright.gif" align="left">') document.writeln('<font face="verdana,arial,helvetica" size=1>') document.writeln(updatestring) document.writeln('</font>') document.writeln('</td>') document.writeln('<td background="images/top_line.gif" width=105 align="right"><IMG SRC="images/topright_line.gif" BORDER=0 WIDTH=5 HEIGHT=78></td>') document.writeln('</tr>') document.writeln('</table>') document.writeln('<table cellspacing=0 cellpadding=0 width=750 border=0 align="center">') document.writeln('<tr>') document.writeln('<td background="images/left_line.gif" valign="top" width=140>') document.writeln('<BR>') document.writeln('<a href="frontpage.php" onmouseover="swapim(\'m01\',1)" onmouseout="swapim(\'m01\',0)"><IMG SRC="images/m01_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m01" alt="Nieuws (home)"></a>') document.writeln('<a href="over.html" onmouseover="swapim(\'m02\',1)" onmouseout="swapim(\'m02\',0)"><IMG SRC="images/m02_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m02" alt="Wie zijn wij?"></a>') document.writeln('<a href="bestuur.html" onmouseover="swapim(\'m10\',1)" onmouseout="swapim(\'m10\',0)"><IMG SRC="images/m10_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m10" alt="Bestuur Tweeduister"></a>') document.writeln('<a href="kost.html" onmouseover="swapim(\'m15\',1)" onmouseout="swapim(\'m15\',0)"><IMG SRC="images/m15_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m15" alt="Wat kost het?"></a>') document.writeln('<a href="dark.html" onmouseover="swapim(\'m14\',1)" onmouseout="swapim(\'m14\',0)"><IMG SRC="images/m14_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m14" alt="Dark Ages Live Roleplay"></a>') document.writeln('<a href="vlrp.html" onmouseover="swapim(\'m03\',1)" onmouseout="swapim(\'m03\',0)"><IMG SRC="images/m03_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m03" alt="Vampire Live Role-Play"></a>') document.writeln('<a href="meld.html" onmouseover="swapim(\'m12\',1)" onmouseout="swapim(\'m12\',0)"><IMG SRC="images/m12_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m12" alt="Aanmelden"></a>') document.writeln('<a href="javascript:forum()" onmouseover="swapim(\'m04\',1)" onmouseout="swapim(\'m04\',0)"><IMG SRC="images/m04_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m04" alt="Forum"></a>') document.writeln('<a href="expe.html" onmouseover="swapim(\'m05\',1)" onmouseout="swapim(\'m05\',0)"><IMG SRC="images/m05_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m05" alt="Experimenteel"></a>') document.writeln('<a href="agen.html" onmouseover="swapim(\'m06\',1)" onmouseout="swapim(\'m06\',0)"><IMG SRC="images/m06_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m06" alt="Agenda"></a>') document.writeln('<a href="javascript:location()" onmouseover="swapim(\'m07\',1)" onmouseout="swapim(\'m07\',0)"><IMG SRC="images/m07_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m07" alt="Locatie"></a>') document.writeln('<a href="link.html" onmouseover="swapim(\'m08\',1)" onmouseout="swapim(\'m08\',0)"><IMG SRC="images/m08_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m08" alt="Links/downloads"></a>') document.writeln('<a href="artg.html" onmouseover="swapim(\'m09\',1)" onmouseout="swapim(\'m09\',0)"><IMG SRC="images/m09_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m09" alt="Art Gallery"></a>') document.writeln('<a href="mail.html" onmouseover="swapim(\'m13\',1)" onmouseout="swapim(\'m13\',0)"><IMG SRC="images/m13_0.gif" BORDER=0 WIDTH=140 HEIGHT=28 name="m13" alt="E-mail"></a>') document.writeln(' <a href="javascript:whitewolf()"><IMG SRC="images/darkbox.jpg" BORDER=0 WIDTH=140 HEIGHT=50 alt="Officially Sanctioned White Wolf Site"></a>') document.writeln(' <a href="javascript:openwin(\'webm.html\')"><IMG SRC="images/skullimation.gif" BORDER=0 WIDTH=80 HEIGHT=50 alt="Webinfo Tweeduister"></a>') document.writeln('</td>') document.writeln('<td width=600 valign="top">') document.writeln('<font face="verdana,arial,helvetica" size=2><BR><blockquote>') } function writefooter(){ document.writeln('<BR><BR></blockquote></font>') document.writeln('</td>') document.writeln('<td width=5 background="images/right_line.jpg">') document.writeln(' ') document.writeln('</td>') document.writeln('</tr>') document.writeln('</table>') document.writeln('<table cellspacing=0 cellpadding=0 width=750 border=0 align="center">') document.writeln('<tr>') document.writeln('<td width=50% align="left" background="images/bot_line.gif"><IMG SRC="images/botleft_line.gif" BORDER=0 WIDTH=45 HEIGHT=5></td>') document.writeln('<td width=50% align="right" background="images/bot_line.jpg"><IMG SRC="images/botright_line.gif" BORDER=0 WIDTH=5 HEIGHT=5></td>') document.writeln('</tr>') document.writeln('</table>') document.writeln('<BR><BR><BR>') }[/code:1:742d8a146c] Je kunt de uitvoering van dit script zien op www.tweeduister.nl (alleen te zien met IE). Wat moet ik veranderen om het werkende te krijgen onder Mozilla. Quote Link naar reactie
anoniem Geplaatst: 6 november 2004 Auteur Delen Geplaatst: 6 november 2004 writeln vervangen door write ? Quote Link naar reactie
anoniem Geplaatst: 6 november 2004 Auteur Delen Geplaatst: 6 november 2004 Ik krijg niet van dat soor errors in Mozilla waneer ik die site bezoek. Quote Link naar reactie
anoniem Geplaatst: 6 november 2004 Auteur Delen Geplaatst: 6 november 2004 Mozilla struikelt zo te zien over het volgende stukje code ... function location() { window.open('loca.html','','directories=no,location=no,scrollbars=no,status=no,toolbar=no,width=700,height=550'); } Ik neem aan dat Mozilla hier slecht op reageert vanwege het feit dat location ook een standaard browser object is. Geef bovenstaande functie dus een nieuwe naam. Quote Link naar reactie
Aanbevolen berichten
Om een reactie te plaatsen, moet je eerst inloggen