[Javascript] switch/ case activating

Richard nomorebull at charter.net
Wed Feb 9 15:25:06 CST 2005


Ok I understand all the basics of the switch/case item.
Basically a more structured "if" array.

My problem is, understanding how to activate it.
In my menu of <ul>, which could be quite long, where and how do you state
what "case" is to be a certain value?"
I plan using string literals, such as "planes", "trains" and that.
For instance:
<div id="planes" style="what ever">
Do I trigger the function with getelementybyID routine or what?

If anyone can come with a short example as to how to do this, I'd appreciate
it.





More information about the Javascript mailing list