Form select multiple question

Discussion in 'HTML' started by Si, Aug 16, 2005.

  1. Si

    Si Guest

    Hi All.

    I have a form element which is 'select multiple'.

    Strange thing is, this does not behave as a multiple select.

    I don't have this published anywhere at the moment to demonstrate.

    The form is also posting binary data for upload to the server. Could the
    enctype be causing the problem? This form works works fine when just
    used on a 'standard' form not posting binary data.

    The binary data is collected via the persits asp upload component, could
    this be the issue?

    For debugging the form data I have just used:

    SubCat=upload.form("intSubCat")
    response.write SubCat
    response.end

    Output always displays the first value option and this is before any
    form processing has occured.

    Relevant HTML is as follows.

    <form action="/Process.asp" method="post" enctype="multipart/form-data">

    <select name="intSubCat" size="6" multiple>
    <option value="1">option1
    <option value="2">option2
    <option value="3">option3
    <option value="4">option4
    <option value="5">option5
    <option value="6">option6
    <option value="7">option7
    <option value="8">option8
    </select>

    Any insights would be greatly appreciated.

    Si
    Si, Aug 16, 2005
    #1
    1. Advertising

  2. Si wrote:

    > Hi All.
    >
    > I have a form element which is 'select multiple'.
    >
    > Strange thing is, this does not behave as a multiple select.
    >
    > I don't have this published anywhere at the moment to demonstrate.
    >
    > The form is also posting binary data for upload to the server. Could the
    > enctype be causing the problem? This form works works fine when just
    > used on a 'standard' form not posting binary data.
    >
    > The binary data is collected via the persits asp upload component, could
    > this be the issue?


    Should not

    > For debugging the form data I have just used:
    >
    > SubCat=upload.form("intSubCat")
    > response.write SubCat
    > response.end


    Probably an ASP issue. Perhaps you have to use another method to get all
    submitted values as a list. Or it may works similar to PHP where you have
    to name the select as intSubCat[] in order to tell PHP that it should
    expect more than one value.
    Anyway, ask you local ASP guru.

    > Output always displays the first value option and this is before any
    > form processing has occured.
    >
    > Relevant HTML is as follows.
    >
    > <form action="/Process.asp" method="post" enctype="multipart/form-data">
    >
    > <select name="intSubCat" size="6" multiple>
    > <option value="1">option1
    > <option value="2">option2
    > <option value="3">option3
    > <option value="4">option4
    > <option value="5">option5
    > <option value="6">option6
    > <option value="7">option7
    > <option value="8">option8
    > </select>


    You might change the form method to "get" - just to test, if the problem is
    really in the server-side code. If you select multiple options and submit,
    the URL should look like
    <http://.../Process.asp?intSubCat=1&intSubCat=5&intSubCat=8>.


    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://www.odahoda.de/
    Benjamin Niemann, Aug 16, 2005
    #2
    1. Advertising

  3. Si

    Adrienne Guest

    Gazing into my crystal ball I observed Si
    <> writing in news:EkrMe.6430$Wq4.3954
    @fe1.news.blueyonder.co.uk:

    > Hi All.
    >
    > I have a form element which is 'select multiple'.
    >
    > Strange thing is, this does not behave as a multiple select.
    >
    > I don't have this published anywhere at the moment to demonstrate.
    >
    > The form is also posting binary data for upload to the server. Could the
    > enctype be causing the problem? This form works works fine when just
    > used on a 'standard' form not posting binary data.
    >
    > The binary data is collected via the persits asp upload component, could
    > this be the issue?
    >


    IIRC, Persits does not allow other form data within the same form, or it is
    in a different collection. Check the Persists help files.

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne, Aug 17, 2005
    #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. Stian
    Replies:
    2
    Views:
    440
    Mark Parnell
    Sep 3, 2004
  2. Burton Figg

    array query with multiple <SELECT> form field

    Burton Figg, Jan 18, 2004, in forum: ASP General
    Replies:
    1
    Views:
    169
    Ray at
    Jan 18, 2004
  3. palmiere
    Replies:
    1
    Views:
    377
    Erwin Moller
    Feb 9, 2004
  4. Ferd Berfel
    Replies:
    4
    Views:
    141
  5. Max
    Replies:
    5
    Views:
    230
    Thomas 'PointedEars' Lahn
    Apr 14, 2008
Loading...

Share This Page