Drop Down (Option Tag)

Discussion in 'HTML & Website Design' started by oo7ml, Apr 11, 2012.

  1. #1
    Hi, my site has a drop down menu on it and i am using a JS script to display the chosen text from the drop down menu at the bottom of a page... my question is... the JS script reads the text in the value="" below and not the text in between the <option> tags

    <option value="sample_text">Sample Text</option>

    Is it ok to display normal text (it is not 2 words instead of 1) in the value="" for example <option value="Sample Text">Sample Text</option>

    Thanks in advance for your help...
     
    oo7ml, Apr 11, 2012 IP
  2. webcosmo

    webcosmo Notable Member

    Messages:
    5,840
    Likes Received:
    153
    Best Answers:
    2
    Trophy Points:
    255
    #2
    you can put normal text in the value, yes.
     
    webcosmo, Apr 11, 2012 IP
  3. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Ok cool, thanks... i thought it could only have one word between the "and not four words"
     
    oo7ml, Apr 11, 2012 IP