What is maximum amount of selected options in SELECT MULTIPLE

Discussion in 'ASP General' started by MaJoHu, Jun 3, 2004.

  1. MaJoHu

    MaJoHu Guest

    I've got a list where u can select some products. It's something like
    this:

    <SELECT NAME='Product' MULTIPLE SIZE='10'>
    <%
    'Get every possible item from items table
    SQL = "SELECT DISTINCT productserie, producttype, itemnummer " &_
    "FROM items " &_
    "ORDER BY productserie, producttype"

    Set DBCon = Server.CreateObject("ADODB.Connection")
    Set ProductRs = Server.CreateObject("ADODB.Recordset")

    DBCon.open strCon
    ProductRs.open SQL, DBCon, 1, 1

    'use the items to create a select list
    While not ProductRs.eof
    Response.Write "<OPTION VALUE='" & ProductRs("itemnummer") &_
    "'>" & ProductRs("productserie") & " " &_
    ProductRs("producttype") & "</OPTION>"

    ProductRs.movenext
    Wend

    ProductRs.close
    DBCon.close
    %>
    </SELECT>

    I want to select many items to make a list. But i found out that if i
    select a lot of items, the submit button doesn't work. Is there a
    restriction on the amount of items selected??

    Many Thnx, MaJoHu
    MaJoHu, Jun 3, 2004
    #1
    1. Advertising

  2. What is "a lot"? What does "doesn't work" mean?

    I don't think there is a hard limit, but there is certainly an upper bound
    to how much the browser and/or the client hardware can handle. It also
    depends on what the browser has to do when the submit button is pressed.

    FWIW, to prevent information overload, our administrative GUIs use
    client-side code to monitor multiple selects, and allow a pre-determined
    maximum number of choices. I'd post the code, but our GUIs are IE-only, and
    this isn't a client-side scripting forum. ;-)

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "MaJoHu" <> wrote in message
    news:...
    > I've got a list where u can select some products. It's something like
    > this:
    >
    > <SELECT NAME='Product' MULTIPLE SIZE='10'>
    > <%
    > 'Get every possible item from items table
    > SQL = "SELECT DISTINCT productserie, producttype, itemnummer " &_
    > "FROM items " &_
    > "ORDER BY productserie, producttype"
    >
    > Set DBCon = Server.CreateObject("ADODB.Connection")
    > Set ProductRs = Server.CreateObject("ADODB.Recordset")
    >
    > DBCon.open strCon
    > ProductRs.open SQL, DBCon, 1, 1
    >
    > 'use the items to create a select list
    > While not ProductRs.eof
    > Response.Write "<OPTION VALUE='" & ProductRs("itemnummer") &_
    > "'>" & ProductRs("productserie") & " " &_
    > ProductRs("producttype") & "</OPTION>"
    >
    > ProductRs.movenext
    > Wend
    >
    > ProductRs.close
    > DBCon.close
    > %>
    > </SELECT>
    >
    > I want to select many items to make a list. But i found out that if i
    > select a lot of items, the submit button doesn't work. Is there a
    > restriction on the amount of items selected??
    >
    > Many Thnx, MaJoHu
    Aaron [SQL Server MVP], Jun 3, 2004
    #2
    1. Advertising

  3. MaJoHu wrote:

    > I want to select many items to make a list. But i found out that if i
    > select a lot of items, the submit button doesn't work.


    What does "doesn't work" mean?

    > Is there a
    > restriction on the amount of items selected??
    >

    None that I know of.

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Jun 3, 2004
    #3
  4. MaJoHu

    Patrice Guest

    AFAIK no particular limit (how many products do you save ? do you use POST
    ?)

    As a side note if you have really that much numerous options, you could try
    something else (such as a popup that would have some filtering capabilities)
    to ease the work of the user...

    Patrice


    "MaJoHu" <> a écrit dans le message de
    news:...
    > I've got a list where u can select some products. It's something like
    > this:
    >
    > <SELECT NAME='Product' MULTIPLE SIZE='10'>
    > <%
    > 'Get every possible item from items table
    > SQL = "SELECT DISTINCT productserie, producttype, itemnummer " &_
    > "FROM items " &_
    > "ORDER BY productserie, producttype"
    >
    > Set DBCon = Server.CreateObject("ADODB.Connection")
    > Set ProductRs = Server.CreateObject("ADODB.Recordset")
    >
    > DBCon.open strCon
    > ProductRs.open SQL, DBCon, 1, 1
    >
    > 'use the items to create a select list
    > While not ProductRs.eof
    > Response.Write "<OPTION VALUE='" & ProductRs("itemnummer") &_
    > "'>" & ProductRs("productserie") & " " &_
    > ProductRs("producttype") & "</OPTION>"
    >
    > ProductRs.movenext
    > Wend
    >
    > ProductRs.close
    > DBCon.close
    > %>
    > </SELECT>
    >
    > I want to select many items to make a list. But i found out that if i
    > select a lot of items, the submit button doesn't work. Is there a
    > restriction on the amount of items selected??
    >
    > Many Thnx, MaJoHu
    Patrice, Jun 3, 2004
    #4
  5. MaJoHu

    Scott Guest

    Make sure the METHOD in your form tag is set to POST - using the default (GET) uses the query string, which has a limit to it...

    SC
    Scott, Jun 3, 2004
    #5
  6. MaJoHu

    MaJoHu Guest

    > What does "doesn't work" mean?

    I meant with doesn't work, that is does nothing when I click on it.
    When I select less items, it will work again.

    > do you use POST?

    Yes, I use POST.

    I was testing with how many items it wouldn't work anymore, but today
    i can select all the items I want and it's still working.... weird.
    Thnx anyway for trying to answer my question.
    MaJoHu, Jun 4, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. palmiere
    Replies:
    1
    Views:
    388
    Erwin Moller
    Feb 9, 2004
  2. TJ Walls

    Select element with no selected options

    TJ Walls, Oct 27, 2004, in forum: Javascript
    Replies:
    15
    Views:
    179
  3. DBoy001

    options.selected on select multiple

    DBoy001, Jul 28, 2006, in forum: Javascript
    Replies:
    4
    Views:
    106
  4. Max
    Replies:
    5
    Views:
    232
    Thomas 'PointedEars' Lahn
    Apr 14, 2008
  5. phanhuyich
    Replies:
    4
    Views:
    257
Loading...

Share This Page