SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: option value

  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    option value

    I have some questions about option value.

    In this sample...
    HTML Code:
    	<option value="byDate">Date</option>
    	<option value="by-date">Date</option>
    	<option value="By Date">Date</option>
    	<option value="date">Date</option>

    1.) What format do you use for option value?


    2.) Does it matter if I use a keyword like "date"?

    Sincerely,


    Debbie

  2. #2
    Non-Member
    Join Date
    May 2014
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    these 4 format of option values are valid.
    and am used

    <option value="byDate">Date</option>
    <option value="by-date">Date</option>
    <option value="date">Date</option>

    The date keyword does not affect the option value.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2014
    Posts
    36
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It is not good to use spaces in there. Try to replace them with _ or -
    CEO @ MSPAN | web design edinburgh

  4. #4
    SitePoint Enthusiast JM Rosón Bravo's Avatar
    Join Date
    Feb 2014
    Location
    Bilbao (Northern Spain)
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by peterorl View Post
    It is not good to use spaces in there. Try to replace them with _ or -
    Why not?

    As far as I know, the value attribute causes no compatibility issues at all in any browsers, and the spaces are encoded properly both in the POST and GET requests.
    José Manuel Rosón Bravo


Bookmarks

Posting Permissions

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