SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Afrika
    Join Date
    Jul 2004
    Location
    Nigeria
    Posts
    1,737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Restrict the size of a select box

    hello
    I have a select box that displays the phone numbers of an sms directory, Which has a limit of 100

    how do i restrict the size of the select box to 10 ?

    thanks

    Code:
    <select name="address_book" multiple id="address_book">
    
          <option value="1234567">1234567</option>
          <option value="1234567">1234567</option>
          <option value="1234567">1234567</option>
          <option value="1234567">1234567</option>
        </select>

  2. #2
    SitePoint Addict danfran's Avatar
    Join Date
    Jan 2005
    Location
    New York City
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe by adding size="10" to the attribute list.

    Dan

  3. #3
    Guru Bullschmidt's Avatar
    Join Date
    Apr 2002
    Location
    USA
    Posts
    524
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure that you can do what you're wanting to.
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

  4. #4
    Afrika
    Join Date
    Jul 2004
    Location
    Nigeria
    Posts
    1,737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    funny i never got a email from this forum that my post had been replied.

    well what i did was to make it dynamic. I added the size attribute to 6, and when the phone book is more than 10 it increases to 12

    size="<% if (phonebook_total) > 10 then
    response.Write(12)
    else response.Write(6)
    end if%>"


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
  •