|
-
May 3rd, 2001, 06:56 PM
#1
Thread Starter
Addicted Member
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
-
May 4th, 2001, 02:45 AM
#2
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|