Accessing ListBox Elements From ASP

Discussion in 'ASP General' started by f_salazar, Dec 21, 2004.

  1. f_salazar

    f_salazar Guest

    English Version !!

    Hi !!

    I have a page with a Form, inside the form I have listbox with 'X' elements.

    Wend I submit the page, an ASP process inside the page have to read those
    elements and then save them in a database.

    I try Request.Form("listbox") but doesnt work !

    I dont know how do it and I cant use a server side listbox.

    Thanks !!
    --
    Francisco J. Salazar - MCP
    -----------------------------------------------------------------------
    Versión En Español

    Hola !!

    Tengo una página con un formulario, dentro de este tengo un listbox con X
    cantidad de elementos; cuando envío la pagina un proceso asp dentro de esta
    misma página debe leer estos elementos para luego almacenarlos en la Base de
    Datos.

    He intendado con el Request.Form("listbox"), pero no funciona

    No se como hacerlo, pero no puedo usar un listbox del lado de servidor.

    De antemano Muchas Gracias

    --
    Francisco J. Salazar - MCP
     
    f_salazar, Dec 21, 2004
    #1
    1. Advertising

  2. What do "doesn't work" and "pero no funciona" mean? Do you get an error?
    Do you get unexpected results? What is a listbox? Do you mean a <SELECT>
    input? Tell us what's happening and show us what it's happening with.

    Ray at work

    "f_salazar" <> wrote in message
    news:...
    > English Version !!
    >
    > Hi !!
    >
    > I have a page with a Form, inside the form I have listbox with 'X'

    elements.
    >
    > Wend I submit the page, an ASP process inside the page have to read those
    > elements and then save them in a database.
    >
    > I try Request.Form("listbox") but doesnt work !
    >
    > I dont know how do it and I cant use a server side listbox.
    >
    > Thanks !!
    > --
    > Francisco J. Salazar - MCP
    > -----------------------------------------------------------------------
    > Versión En Español
    >
    > Hola !!
    >
    > Tengo una página con un formulario, dentro de este tengo un listbox con X
    > cantidad de elementos; cuando envío la pagina un proceso asp dentro de

    esta
    > misma página debe leer estos elementos para luego almacenarlos en la Base

    de
    > Datos.
    >
    > He intendado con el Request.Form("listbox"), pero no funciona
    >
    > No se como hacerlo, pero no puedo usar un listbox del lado de servidor.
    >
    > De antemano Muchas Gracias
    >
    > --
    > Francisco J. Salazar - MCP
     
    Ray Costanzo [MVP], Dec 21, 2004
    #2
    1. Advertising

  3. f_salazar

    f_salazar Guest

    Hi Ray !!

    First at all, Im not good writing english and the first message is write in
    english and Spanish !!

    I have the usual page with 2 listbox to add or remove elements from one to
    another !!

    Im try to make a security page when you choose the users who has access to
    the Web Application, passing them from one listbox to the other !!

    When you are done, the you submit the page... and here is my question !!

    I need to be able to read the elements from the 2nd listbox (it has the new
    users) and then save that info to my database.

    I try using the Request.Form("listbox2") sentence and dont retreive the
    elements of the listbox !!

    I need to know who can I do it !!

    Thank you for the fast answer and for your help !!

    Francisco !!


    "Ray Costanzo [MVP]" wrote:

    > What do "doesn't work" and "pero no funciona" mean? Do you get an error?
    > Do you get unexpected results? What is a listbox? Do you mean a <SELECT>
    > input? Tell us what's happening and show us what it's happening with.
    >
    > Ray at work
    >
    > "f_salazar" <> wrote in message
    > news:...
    > > English Version !!
    > >
    > > Hi !!
    > >
    > > I have a page with a Form, inside the form I have listbox with 'X'

    > elements.
    > >
    > > Wend I submit the page, an ASP process inside the page have to read those
    > > elements and then save them in a database.
    > >
    > > I try Request.Form("listbox") but doesnt work !
    > >
    > > I dont know how do it and I cant use a server side listbox.
    > >
    > > Thanks !!
    > > --
    > > Francisco J. Salazar - MCP
    > > -----------------------------------------------------------------------
    > > Versión En Español
    > >
    > > Hola !!
    > >
    > > Tengo una página con un formulario, dentro de este tengo un listbox con X
    > > cantidad de elementos; cuando envío la pagina un proceso asp dentro de

    > esta
    > > misma página debe leer estos elementos para luego almacenarlos en la Base

    > de
    > > Datos.
    > >
    > > He intendado con el Request.Form("listbox"), pero no funciona
    > >
    > > No se como hacerlo, pero no puedo usar un listbox del lado de servidor.
    > >
    > > De antemano Muchas Gracias
    > >
    > > --
    > > Francisco J. Salazar - MCP

    >
    >
    >
     
    f_salazar, Dec 21, 2004
    #3
  4. f_salazar

    f_salazar Guest

    Hi Again !!

    Yes the listbox = select ... sorry Im a VB 6 developer and right now Im
    working with Visual InterDev.

    "Ray Costanzo [MVP]" wrote:

    > What do "doesn't work" and "pero no funciona" mean? Do you get an error?
    > Do you get unexpected results? What is a listbox? Do you mean a <SELECT>
    > input? Tell us what's happening and show us what it's happening with.
    >
    > Ray at work
    >
    > "f_salazar" <> wrote in message
    > news:...
    > > English Version !!
    > >
    > > Hi !!
    > >
    > > I have a page with a Form, inside the form I have listbox with 'X'

    > elements.
    > >
    > > Wend I submit the page, an ASP process inside the page have to read those
    > > elements and then save them in a database.
    > >
    > > I try Request.Form("listbox") but doesnt work !
    > >
    > > I dont know how do it and I cant use a server side listbox.
    > >
    > > Thanks !!
    > > --
    > > Francisco J. Salazar - MCP
    > > -----------------------------------------------------------------------
    > > Versión En Español
    > >
    > > Hola !!
    > >
    > > Tengo una página con un formulario, dentro de este tengo un listbox con X
    > > cantidad de elementos; cuando envío la pagina un proceso asp dentro de

    > esta
    > > misma página debe leer estos elementos para luego almacenarlos en la Base

    > de
    > > Datos.
    > >
    > > He intendado con el Request.Form("listbox"), pero no funciona
    > >
    > > No se como hacerlo, pero no puedo usar un listbox del lado de servidor.
    > >
    > > De antemano Muchas Gracias
    > >
    > > --
    > > Francisco J. Salazar - MCP

    >
    >
    >
     
    f_salazar, Dec 21, 2004
    #4
  5. Listbox is a <SELECT>, correct?

    When you submit a form with a <SELECT> element, it only passes the items
    that are selected. You can either use some client-side code to mirror the
    items in a hidden input, or add some javascript to select all of the items
    in the <SELECT> just prior to submitting. Example:

    <script type="text/javascript">
    function selectAll(o) {
    for(var i=0;i<o.length;i++) {
    o.selected=true;
    }
    return true;
    }
    </script>

    <form method="post" action="youraction.asp" onsubmit="return
    selectAll(listbox2);">
    <select name="listbox2" multiple>
    ''options added by your existing code
    </select>
    <input type="submit">
    </form>

    Ray at work

    "f_salazar" <> wrote in message
    news:...
    > Hi Ray !!
    >
    > First at all, Im not good writing english and the first message is write

    in
    > english and Spanish !!
    >
    > I have the usual page with 2 listbox to add or remove elements from one to
    > another !!
    >
    > Im try to make a security page when you choose the users who has access to
    > the Web Application, passing them from one listbox to the other !!
    >
    > When you are done, the you submit the page... and here is my question !!
    >
    > I need to be able to read the elements from the 2nd listbox (it has the

    new
    > users) and then save that info to my database.
    >
    > I try using the Request.Form("listbox2") sentence and dont retreive the
    > elements of the listbox !!
    >
    > I need to know who can I do it !!
    >
    > Thank you for the fast answer and for your help !!
    >
    > Francisco !!
    >
    >
    > "Ray Costanzo [MVP]" wrote:
    >
    > > What do "doesn't work" and "pero no funciona" mean? Do you get an

    error?
    > > Do you get unexpected results? What is a listbox? Do you mean a

    <SELECT>
    > > input? Tell us what's happening and show us what it's happening with.
    > >
    > > Ray at work
    > >
    > > "f_salazar" <> wrote in message
    > > news:...
    > > > English Version !!
    > > >
    > > > Hi !!
    > > >
    > > > I have a page with a Form, inside the form I have listbox with 'X'

    > > elements.
    > > >
    > > > Wend I submit the page, an ASP process inside the page have to read

    those
    > > > elements and then save them in a database.
    > > >
    > > > I try Request.Form("listbox") but doesnt work !
    > > >
    > > > I dont know how do it and I cant use a server side listbox.
    > > >
    > > > Thanks !!
    > > > --
    > > > Francisco J. Salazar - MCP

    > >

    > -----------------------------------------------------------------------
    > > > Versión En Español
    > > >
    > > > Hola !!
    > > >
    > > > Tengo una página con un formulario, dentro de este tengo un listbox

    con X
    > > > cantidad de elementos; cuando envío la pagina un proceso asp dentro

    de
    > > esta
    > > > misma página debe leer estos elementos para luego almacenarlos en

    la Base
    > > de
    > > > Datos.
    > > >
    > > > He intendado con el Request.Form("listbox"), pero no funciona
    > > >
    > > > No se como hacerlo, pero no puedo usar un listbox del lado de

    servidor.
    > > >
    > > > De antemano Muchas Gracias
    > > >
    > > > --
    > > > Francisco J. Salazar - MCP

    > >
    > >
    > >
     
    Ray Costanzo [MVP], Dec 21, 2004
    #5
    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. blenderdude
    Replies:
    0
    Views:
    1,105
    blenderdude
    Aug 3, 2003
  2. DC Gringo
    Replies:
    0
    Views:
    413
    DC Gringo
    Apr 6, 2004
  3. Simon Prince
    Replies:
    2
    Views:
    3,355
    =?Utf-8?B?TWljaGFlbCBUYXlsb3I=?=
    Oct 19, 2004
  4. Gerald Aichholzer
    Replies:
    2
    Views:
    2,560
    Gerald Aichholzer
    Jun 27, 2006
  5. Mark Rae
    Replies:
    2
    Views:
    497
    Mark Rae
    Sep 23, 2006
Loading...

Share This Page