Results 1 to 2 of 2

Thread: Select All button on a Form

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Ireland
    Posts
    224

    Select All button on a Form

    Hi Guys,
    I have a table that I generate with ASP. the table is contained in a form and each of the table cells have checkbox beside them. I was wondering if anyone knows how I could make a button that will select all of them. and secondly make a button that will print all the selected items.
    Thanks for your help
    JK

  2. #2
    Lively Member
    Join Date
    Jan 2001
    Posts
    118

    Talking

    Easy

    The Code

    <Script Language = "Vbscript">

    Sub btn_button_onclick()

    Dim checkbox
    Dim Tempstr

    For each checkbox in document.formname
    if checkbox.type = "checkbox" then
    checkbox.checked = true
    end if
    Next

    End Sub
    </Script>


    <input type = "button" name = "btn_button">

    You can use this code for any control on the screen.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width