Results 1 to 4 of 4

Thread: Please - this cannot be so difficult

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Angry

    Hello,

    I have 2 pages - "pageone" and "pagetwo". On "pageone" I have 2
    dropdown menus - "products" and "selected". The "products" dropdown
    is filled with 50 different products. The user can click on any one of
    these products, which is then moved/copied to the "selected" dropdown.

    Once the user has selected all the products he wants - ie. the "selected"
    dropdown is filled, he then submits(submit button) the page which then
    posts/opens "pagetwo". In "pagetwo" I want to run some asp script to
    retrieve each and every item in the dropdown "selected".

    I know HOW MANY selections there are, but I cannot seem to retrieve it
    I tried this....

    ''prdctr is the count of how many items there are in the dropdown!!
    for index = 1 to prdctr
    response.write request.form("selected")(index)
    next

    ....this does not work as it only sees that ONE item is selected - which
    is actually true, only ONE item is selected at a time!! I tried changing
    the "selected" dropdown property to "MULTIPLE" and size="10", which then works, but
    as soon as the user selects more than 10 items and a scrollbar appears I
    get some "IE Internal error".

    Please anyone, how can I "read" thru the "selected" dropdown and
    response.write each and every item in that dropdown - selected or not!!

    Thanks,
    T

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    I'm assuming this to need to be server side script on page2 and assuming that 'selected' is the NAME of your select tag:

    Code:
    for index = 1 to request.form("selected").Count
        response.write request.form("selected")(index) 
    next
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343
    Hi Monte96,

    Thanks, but this will not solve my problem as only ONE option will actually be selected - for some reason I get errors when setting the "select box" to accept multiple selections, so COUNT will always be 1.

    T

  4. #4
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    What kind of errors?

    I know it works cuz I use it all the time.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

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



Click Here to Expand Forum to Full Width