12-10-2004, 01:17 PM
| THREAD STARTER
#1 (permalink)
|
| New Member Join Date: Dec 2004
Posts: 9
| Javascript Submenu What is the best way to make a javascript (therefore active) submenu? The only way I found was the switch element, but it won't work for me. This is what I have: HTML Code: <!--in the head-->
<script language="javascript">
var submenu;
var chg;
function chgsub(chg) {
submenu = chg;
}
</script> HTML Code: <!--where i want the submenu-->
<script language="javascript">
switch (submenu){
case "resume":
document.write = "Osiris|Zelda|Comics";
break;
}
</script> HTML Code: <!--link to change submenu-->
<a href="javascript:chgsub('resume');">Resume</a> That won't work and I can't think of any other way. I could use php, but I don't want to have to reload (i want it active). Any ideas? |
| |