Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Javascript Submenu

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
NamecheapNamecheap
Watch
Impact
0
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:
<!--in the head-->
<script language="javascript">
	var submenu;
	var chg;
	function chgsub(chg) {
		submenu = chg;
	}
</script>
HTML:
<!--where i want the submenu-->
<script language="javascript">
	switch (submenu){
	case "resume":
		document.write = "Osiris|Zelda|Comics";
	break;
}
</script>
HTML:
<!--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?
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back