How can I separate FORM SELECT with multiple selections?

Discussion in 'ASP General' started by Stian, Sep 2, 2004.

  1. Stian

    Stian Guest

    Hi!

    I have made a form with two SELECT LIST-boxes where the first is dynmically
    filled when you enter the page, and then one can select multiple options
    from the list and move across to the other box using javascript. Every
    option in the list has an integer value.

    The FORM is submitted with the POST method and received on an ASP page. I
    then want to manage the selected options one by one. How can I separate
    them?

    It currently looks like this (with four selections from the box).
    1, 5, 9, 10

    I tried to manage this as a string, but was told that it was not a string.
    Type mismatch: '[string: "1, 5, 9, 10"]'

    Can anyone help med with some code that can separate these options for
    further work?

    Regards, Stian
     
    Stian, Sep 2, 2004
    #1
    1. Advertising

  2. use Split to get them into an array


    --
    Roji. P. Thomas
    Net Asset Management
    https://www.netassetmanagement.com


    "Stian" <> wrote in message
    news:e0AZc.4610$g%...
    > Hi!
    >
    > I have made a form with two SELECT LIST-boxes where the first is

    dynmically
    > filled when you enter the page, and then one can select multiple options
    > from the list and move across to the other box using javascript. Every
    > option in the list has an integer value.
    >
    > The FORM is submitted with the POST method and received on an ASP page. I
    > then want to manage the selected options one by one. How can I separate
    > them?
    >
    > It currently looks like this (with four selections from the box).
    > 1, 5, 9, 10
    >
    > I tried to manage this as a string, but was told that it was not a string.
    > Type mismatch: '[string: "1, 5, 9, 10"]'
    >
    > Can anyone help med with some code that can separate these options for
    > further work?
    >
    > Regards, Stian
    >
    >
     
    Roji. P. Thomas, Sep 2, 2004
    #2
    1. Advertising

  3. Stian wrote:
    > Hi!
    >
    > I have made a form with two SELECT LIST-boxes where the first is
    > dynmically filled when you enter the page, and then one can select
    > multiple options from the list and move across to the other box using
    > javascript. Every option in the list has an integer value.
    >
    > The FORM is submitted with the POST method and received on an ASP
    > page. I then want to manage the selected options one by one. How can
    > I separate them?
    >
    > It currently looks like this (with four selections from the box).
    > 1, 5, 9, 10
    >
    > I tried to manage this as a string, but was told that it was not a
    > string. Type mismatch: '[string: "1, 5, 9, 10"]'
    >
    > Can anyone help med with some code that can separate these options for
    > further work?
    >
    > Regards, Stian


    Show the line of code that caused that error.

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Sep 2, 2004
    #3
    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. zdrakec
    Replies:
    0
    Views:
    526
    zdrakec
    Jul 22, 2005
  2. zdrakec
    Replies:
    0
    Views:
    474
    zdrakec
    Jul 22, 2005
  3. Stian
    Replies:
    2
    Views:
    464
    Mark Parnell
    Sep 3, 2004
  4. studen771

    LoadPostData and html <select> with multiple selections

    studen771, Sep 22, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    192
    studen771
    Sep 22, 2006
  5. Paul
    Replies:
    29
    Views:
    446
Loading...

Share This Page