Hi,
I am trying to get javascript to write the following code into my page, however it will not show
This is the javascript that I have have tried
The insertmenu function needs to be able to change the class of the chosen list item to selected
Could you please help
Thnx in advance
I am trying to get javascript to write the following code into my page, however it will not show
Code:
<ul class="basictab"> <li class="selected"><a href="my menu test.htm">Home</a></li> <li><a href="slashdot_menu.html">Slashdot Menu</a></li> <li><a href="block_menu.htm">Block Menu</a></li> <li><a href="shadow_test.htm">Shadow Test</a></li> </ul>
Code:
<!--
function insertmenu(text){
var object = text.className
object.className = "selected";
}
function writeJS(){
var str='';
str+='<ul class="basictab">';
str+='<li name="home" class=""><a href="my menu test.htm">Home<\/a><\/li>';
str+='<li name="slashdot" class=""><a href="slashdot_menu.html">Slashdot Menu<\/a><\/li>';
str+='<\/ul>
document.write(str);
}
//-->
Could you please help
Thnx in advance
Comment