Results 1 to 2 of 2

Thread: Referencing the value of a drop-down box

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    23
    I am trying to grab the value of the selected item in a drop-down(select) box. I have tried select1.selecteditem.value, but that is not a property. Any help?
    Stephen Warker

  2. #2
    Guest
    If you have a SELECT setup with VALUE attributes, ex:

    <SELECT NAME="selWhatever">
    <OPTION VALUE="Red">Red
    <OPTION VALUE="Green">Green
    <OPTION VALUE="Blue">Blue
    </SELECT>

    ...then you can get the value of the select with selectName.value, for example:

    alert(selWhatever.value)

    Hope this helps,
    Paul

Posting Permissions

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



Click Here to Expand Forum to Full Width