In my JS file, I made sure to write the necessary html code for a menu using [I]document.write
I know about escape sequences and I put backslashes before every special characters but my menu still does not appear. Maybe only a simple character is missing.
The code do work when I write it directly in my html so there should be no errors in the code itself. Must be in the way I put it in my JS file.
All files are in root directory of my server.
[U][B]File listing
[LIST][*]
test.htm
menu.js
tree_dom.js (file for menu appearance and functionality – not the problem here)
menu0.gif
menu1.gif
[U][B]JS file content
document.write(‘ <table id=”m1mainSXMenu2″ cellspacing=”0″ cellpadding=”0″ style=”width:171px”>’);
document.write(‘ <tr>
document.write(‘<td>’);
document.write(‘<div id=”I0SXE5SXP” onmouseover=”itemHL(this,’#d5ad86′,’White’)” onmouseout=”itemHL(this)” onclick=”p06(null,0,5)” class=”SXP0″>’);
document.write(‘ <img id=”MI0SXE5SXP” src=”./menui0.gif” class=”im” style=”border-style:none;vertical-align:bottom” alt=”” /> Le profil’);
document.write(‘</div>’);
document.write(‘<div id=”I0SXE5SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” class=”SXC0″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Le sculpteur’);
document.write(‘</div>’);
document.write(‘<div id=”I0SXE7SXP” onmouseover=”itemHL(this,’#d5ad86′,’White’)” onmouseout=”itemHL(this)” onclick=”p06(null,0,7)” class=”SXP0″>
document.write(‘ <img id=”MI0SXE7SXP” src=”./menui0.gif” class=”im” style=”border-style:none;vertical-align:bottom” alt=”” /> Les produits’);
document.write(‘</div>’);
document.write(‘<div id=”I1SXE8SXP” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” onclick=”p06(null,1,8)” class=”SXP1″>’);
document.write(‘ <img id=”MI1SXE8SXP” src=”./menui0.gif” class=”im” style=”border-style:none;vertical-align:bottom” alt=”” /> Les sculptures corporatives’);
document.write(‘</div>’);
document.write(‘<div id=”I1SXE8SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#cbb98d;” class=”SXC1″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les logos / armoiries’);
document.write(‘</div>’);
document.write(‘<div id=”I1SXE10SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#cbb98d;” class=”SXC1″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les enseignes’);
document.write(‘</div>’);
document.write(‘<div id=”I1SXE11SXP” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” onclick=”p06(null,1,11)” class=”SXP1″>’);
document.write(‘ <img id=”MI1SXE11SXP” src=”./menui0.gif” class=”im” style=”border-style:none;vertical-align:bottom” alt=”” /> Les sculptures thématiques’);
document.write(‘</div>’);
document.write(‘<div id=”I2SXE12SXP” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” onclick=”p06(null,2,12)” style=”background-color:#cbb98d;” class=”SXP2″>’);
document.write(‘ <img id=”MI2SXE12SXP” src=”./menui0.gif” class=”im” style=”border-style:none;vertical-align:bottom” alt=”” /> Le Poker’);
document.write(‘</div>’);
document.write(‘<div id=”I2SXE12SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#e4d3b0;” class=”SXC2″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les protège-cartes’);
document.write(‘</div>’);
document.write(‘<div id=”I2SXE14SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#e4d3b0;” class=”SXC2″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les trophées’);
document.write(‘</div>’);
document.write(‘<div id=”I2SXE15SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#e4d3b0;” class=”SXC2″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les pièces décoratives’);
document.write(‘</div>’);
document.write(‘<div id=”I2SXE16SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#e4d3b0;” class=”SXC2″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les tables de Poker’);
document.write(‘</div>’);
document.write(‘<div id=”I2SXE17SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#e4d3b0;” class=”SXC2″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les boitiers à jetons (sit’n go)’);
document.write(‘</div>’);
document.write(‘<div id=”I1SXE18SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#cbb98d;” class=”SXC1″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les animaux’);
document.write(‘</div>’);
document.write(‘<div id=”I1SXE19SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#cbb98d;” class=”SXC1″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les personnages’);
document.write(‘</div>’);
document.write(‘<div id=”I0SXE20SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” class=”SXC0″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les utilitaires’);
document.write(‘</div>’);
document.write(‘<div id=”I0SXE21SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” class=”SXC0″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les exclusifs’);
document.write(‘</div>’);
document.write(‘<div id=”I0SXE22SXP” onmouseover=”itemHL(this,’#d5ad86′,’White’)” onmouseout=”itemHL(this)” onclick=”p06(null,0,22)” class=”SXP0″>’);
document.write(‘ <img id=”MI0SXE22SXP” src=”./menui0.gif” class=”im” style=”border-style:none;vertical-align:bottom” alt=”” /> Les services’);
document.write(‘</div>’);
document.write(‘<div id=”I1SXE23SXP” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” onclick=”p06(null,1,23)” class=”SXP1″>’);
document.write(‘ <img id=”MI1SXE23SXP” src=”./menui0.gif” class=”im” style=”border-style:none;vertical-align:bottom” alt=”” /> Les ateliers’);
document.write(‘</div>’);
document.write(‘<div id=”I1SXE23SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#cbb98d;” class=”SXC1″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Le S.T.A.R’);
document.write(‘</div>’);
document.write(‘<div id=”I1SXE25SXP” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” onclick=”p06(null,1,25)” class=”SXP1″>’);
document.write(‘ <img id=”MI1SXE25SXP” src=”./menui0.gif” class=”im” style=”border-style:none;vertical-align:bottom” alt=”” /> Les cours’);
document.write(‘</div>’);
document.write(‘<div id=”I1SXE25SXC” onmouseover=”itemHL(this,’#ab9c74′,’White’)” onmouseout=”itemHL(this)” style=”background-color:#cbb98d;” class=”SXC1″>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Le S.T.E.P.’);
document.write(‘</div>’);
document.write(‘<div id=”SXR27″ onmouseover=”itemHL(this,’#d5ad86′,’White’)” onmouseout=”itemHL(this)” class=”SXR”>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Les évènements’);
document.write(‘</div> ‘)
document.write(‘<div id=”SXR28″ onmouseover=”itemHL(this,’#d5ad86′,’White’)” onmouseout=”itemHL(this)” class=”SXR”>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Liens intéressants’);
document.write(‘</div>’);
document.write(‘<div id=”SXR29″ onmouseover=”itemHL(this,’#d5ad86′,’White’)” onmouseout=”itemHL(this)” class=”SXR”>’);
document.write(‘ <img src=’./empty.gif’ width=’5′ height=’1′ style=’border-style:none;vertical-align:middle’ alt=” /> Pour me joindre’);
document.write(‘</div>’);
document.write(‘</td>’);
document.write(‘ </tr>’);
document.write(‘ </table>’);
—
[U][B]HTML page content (the part where I want to put my menu files)
<div class=”arrowsidemenu”>
<!– Menu Start –>
<script src=”menu.js”></script>
<!– End of Menu –>
</div>
—
Thank you in advance for your help.
Philippe