Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    New Jersey
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    need help with case statement

    I saw it once before, but cant find it again, but I am looking for information on how to use the "case" statement to control the value of other variables and functions. Any direction you guys can send me to get help with this will be appreciated.

    GateKeeper

  • #2
    Regular Coder
    Join Date
    May 2002
    Location
    Maine, USA
    Posts
    573
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Are you talking about something like:

    var myText = "THIS IS ALL UPPERCASE, FOR NOW!"
    var changed = myText.toLowerCase();

    In the above example, the myText variable will be converted to lowercase. So if you went:

    <script language="javascript" type="text/javascript">
    document.write(changed);
    </script>

    The result would be:

    this is all uppercase, for now!

    Or am I completely off base and misunderstanding what you're asking?
    boxer_1
    CodingForums Moderator
    "How did a fool and his money get together in the first place?"

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try devguru:

    http://www.devguru.com/Technologies/ecmascript/quickref/switch.html

    check out the site, it's very usefull.

    I think he means case as in unix scripts.
    Last edited by x_goose_x; 07-29-2002 at 12:12 AM.

  • #4
    New Coder
    Join Date
    Jul 2002
    Location
    New Jersey
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeah, it was the switch statement I was looking for (feels dumb now) anyways, that was a good site, now I just gotta get it working the way I want it to. Thanx

    GK


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •