hi,
the next script works perfectly in explorer but doesn't work ik firefox,
It is supposed to change bgcolor of the page depending on wich menu the page belongs to.
REPLACE_BY_MENU is replaced by the correct number.
So the error should lie in document.bgcolor ?
you can see the result at www.bouworde.be (dutch speaking site)
HTML Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> Bouworde vzw </TITLE> <META NAME="Generator" CONTENT=""> <META NAME="Author" CONTENT="Faber Vanmolkot iov Bouworde vzw"> <META NAME="Keywords" CONTENT=" bouwkamp, sociaalkamp, ecokamp, sensokamp, vrijwilligerswerk "> <META NAME="Description" CONTENT=""> <link href="css/style.css" rel="stylesheet" type="text/css" /> <!--vervangt bollen door tekst EN laat telkens het juiste menu zien links--> <script type="text/javascript"> //knop "zwart" maken function bolIt(id){ document.getElementById('bol' + id ).src='layout/bol' + id + '_of.gif';// was 'images/test' + id + '_on.GIF' } function bolIt(id,huidig){ if (id!=huidig){ document.getElementById('bol' + id ).src='layout/bol' + id + '_of.gif';// was 'images/test' + id + '_on.GIF' } } //knop "grijs" maken: function whiteIt(id){ document.getElementById('bol' + id).src='layout/bol' + id + '_on.gif'; //'layout/bol' + id + '_of.gif' } function loadMenu(id) { bolIt(id); //alle menus onzichtbaar maken: //for(dummy=1;dummy<=4;dummy++){ // document.getElementById('menu'+dummy).style.display='None'; //} //huidige menu tonen: document.getElementById('menu'+id).style.display=''; } function unloadMenu(id) { whiteIt(id); //document.getElementById('menu'+id).style.display='None'; } var geval = REPLACE_BY_MENU; switch (geval) { case 0: document.bgColor = '#fbc202'; break; case 2: document.bgColor = '#fbc202'; break; case 11: document.bgColor = '#f3983f'; break; case 44: document.bgColor = '#f1abb1'; break; case 52: document.bgColor = '#7e1a26'; break; default: document.bgColor = '#fbc202'; } </script> </HEAD> <BODY bgcolor=#f79648>






Bookmarks