Multiple Selections

Discussion in 'ASP General' started by jjuan, Feb 8, 2007.

  1. jjuan

    jjuan Guest

    I have a multiple dropdown which have multiple selection.

    If I select multiple value on my multiple dropdown list and submit it,how
    can i write it on the tblotherlang

    sample code

    <select size="10" name="ddmultiplelang" multiple>
    <%

    qryNCDesc = "SELECT MultiLanguageID, MultiLanguageDesc FROM tbllang"

    Set rstNCDesc = Server.CreateObject("ADODB.Recordset")
    rstNCDesc.open qryNCDesc, cndpr
    %>
    <%
    Do While NOT rstNCDesc.EOF
    %>
    <option
    value="<%=rstNCDesc.Fields("MultiLanguageID").Value%>"><%=rstNCDesc.Fields("MultiLanguageDesc").Value%></option>
    <%
    rstNCDesc.MoveNext
    Loop
    %>




    I have this three table:

    tbllang

    MultiLanguageID LanguageDesc
    1 Filipino
    2 English
    3 Japanese


    tblmain

    NameID name language MultiLanguage
    1 Joan Filipino a
    2 Katrina English
    3 Kristine Japanese a


    tblotherlang

    OtherLangID OthernameID othermultilaguange
    1 1 2
    2 1 3
    3 3 1




    How can i insert the value on tblotherlang.othernameID and
    tblotherlang.othermultilanguage?

    Please help!

    THANKS
    jjuan, Feb 8, 2007
    #1
    1. Advertising

  2. "jjuan" <> wrote in message
    news:%...
    >I have a multiple dropdown which have multiple selection.
    >
    > If I select multiple value on my multiple dropdown list and submit it,how
    > can i write it on the tblotherlang
    >
    > sample code
    >
    > <select size="10" name="ddmultiplelang" multiple>
    > <%
    >
    > qryNCDesc = "SELECT MultiLanguageID, MultiLanguageDesc FROM tbllang"
    >
    > Set rstNCDesc = Server.CreateObject("ADODB.Recordset")
    > rstNCDesc.open qryNCDesc, cndpr
    > %>
    > <%
    > Do While NOT rstNCDesc.EOF
    > %>
    > <option
    > value="<%=rstNCDesc.Fields("MultiLanguageID").Value%>"><%=rstNCDesc.Fields("MultiLanguageDesc").Value%></option>
    > <%
    > rstNCDesc.MoveNext
    > Loop
    > %>
    >
    >
    >
    >
    > I have this three table:
    >
    > tbllang
    >
    > MultiLanguageID LanguageDesc
    > 1 Filipino
    > 2 English
    > 3 Japanese
    >
    >
    > tblmain
    >
    > NameID name language MultiLanguage
    > 1 Joan Filipino a
    > 2 Katrina English
    > 3 Kristine Japanese a
    >
    >
    > tblotherlang
    >
    > OtherLangID OthernameID othermultilaguange
    > 1 1 2
    > 2 1 3
    > 3 3 1
    >
    >
    >
    >
    > How can i insert the value on tblotherlang.othernameID and
    > tblotherlang.othermultilanguage?


    Assuming that ddmultiplelang is contained in a form, the ASP script that
    form posts to will receive the user selection as an array:

    <html><body><form method=post action=#>
    <select name=ddmultiplelang size=10 multiple>
    <option value=1>English</option>
    <option value=2>Filipino</option>
    <option value=3>French</option>
    <option value=4>German</option>
    <option value=5>Japanese</option>
    <option value=6>Russian</option>
    <option value=7>Spanish</option>
    </select><input type=submit /></form>
    <%
    For i = 1 to Request.Form("ddmultiplelang").count
    Response.Write Request.Form("ddmultiplelang")(i) & "<br>"
    Next
    %>
    </body></html>



    So, assuming you also provide the posted-to ASP with the id of the current
    user, you'd need to insert a row for each element in the array.


    -Mark



    > Please help!
    >
    > THANKS
    >
    >
    Mark J. McGinty, Feb 8, 2007
    #2
    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. bill yeager

    multiple listbox selections

    bill yeager, Aug 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    436
    bill yeager
    Aug 12, 2003
  2. =?Utf-8?B?QWRpcw==?=
    Replies:
    0
    Views:
    378
    =?Utf-8?B?QWRpcw==?=
    Oct 19, 2004
  3. John Hoge

    Bind multiple selections to a query

    John Hoge, Nov 30, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,188
    John Hoge
    Nov 30, 2004
  4. Steffen Loringer

    Multiple selections in dropdownlist

    Steffen Loringer, Aug 11, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,337
    Mark Rae
    Aug 11, 2005
  5. Chris Kettenbach

    asp:ListBox multiple selections

    Chris Kettenbach, Oct 7, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    10,310
    S. Justin Gengo
    Oct 7, 2005
Loading...

Share This Page