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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question JS newbie needs help

    I need to figure out how to determine the value of the selected option in a dropdown select list. I am 99% clueless about javascript.

    I've gotten this far:

    document.myForm.mySelectName.selected.value

    also tried:

    document.myForm.mySelectName.option.value

    AND

    document.myForm.mySelectName.option.selected.value

    but none of them seem to work.

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    document.myForm.mySelectName.options[document.myForm.mySelectName.selectedIndex].value
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

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