Thread: Checkboxes

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Netherlands
    Posts
    1
    Rep Power
    0

    Checkboxes


    I'm trying to create a form that has checkboxes on it that when a user checks the particular boxes, and submits the form, it performs the query based on the selections.

    I'm using MS Access and FrontPage. I'm having problems passing the information from the form to the query and then to the database.

    Any links or suggestions would be appreciated. I'm new to ASP an SQL so any helpful links would also be appreciated.
  2. #2
  3. superficial
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    Peterborough, England
    Posts
    188
    Rep Power
    13
    form elements are passed via their name and value to asp pages, using the post or get methods.

    therefore, your checkbox needs to have a name attribute in order for it to be picked up by the forms collection of the request object.

    e.g.

    Code:
    <input type="checkbox" name="something" />
    then in ASP, you refer to this as
    Code:
    Request.Form("something")
    Something you can do to check what your form is passing in terms of values, is make your page post to a page which loops through the forms collection and writes all the values out to the page.

    Code:
    dim blah
    
    for each blah in request.form
    response.write blah & "<br>"
    next
    then you can see what's being passed, if its not as expected then you haven't setup the element names or variables in the ASP.

    Hopefully this gets you on the right track.....I'd recommend you buy beginning asp 3.0 by wrox press.
    _______________
    Matt

IMN logo majestic logo threadwatch logo seochat tools logo