Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default [HTML] Drop Down List - Selected?

    Err how do I specify a select drop down field?

    Ex:
    <select size="1">
    <option value="lol">lol</option>
    <option value="ok">ok</option>
    </select>

    I tried some things but it didn't work.
    Vouches
    [x][x]

  2. #2
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    dont put size="1" in
    Coming and going...
    Highers are getting the better of me

  3. #3
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    My IDE automatically added that.
    Vouches
    [x][x]

  4. #4

    Default

    Code:
    selected="selected"
    e.g.
    Code:
    <select>
      <option>One</option>
      <option>Two</option>
      <option selected="selected">Three</option>
    </select>

  5. #5
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by Iszak View Post
    Code:
    selected="selected"
    e.g.
    Code:
    <select>
      <option>One</option>
      <option>Two</option>
      <option selected="selected">Three</option>
    </select>
    You don't need to put selected="selected", as selected is a bool value.

    just:

    Code:
    <select name="country">
        <option value="UK">United Kingdom</option>
        <option value="CA">Canada</option>
        <option selected value="US">United States</option>
    </select>

  6. #6
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    Uh well can I do <select selected value="US"> instead? It's for an edit profile thing so I need to pull the country letters from the db.
    Vouches
    [x][x]

  7. #7
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    No.. you do <option selected value="US">United States</option>

    options go in selects.

  8. #8
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    So <option selected value="CA">United States</option> obviously wouldnt work right? So that basically means that theres no easy way to pull the country code from a database a show that option as selected right?
    Vouches
    [x][x]

  9. #9
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by Fazon View Post
    So <option selected value="CA">United States</option> obviously wouldnt work right? So that basically means that theres no easy way to pull the country code from a database a show that option as selected right?
    Yeah there is, and yeah that would work.. why would you think it wouldn't work?

  10. #10
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    I don't know? lmao.
    Vouches
    [x][x]

Page 1 of 2 12 LastLast

Posting Permissions

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