[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


selecting all checkboxes

Posted on 2006-03-27
Medium Priority
Last Modified: 2013-12-25
I have a form where the user enters all the data and clicks submit. The parameters enetered are then passed to web page 2 where the data is displayed. The fields are text boxes except for 1 question which uses checkboxes. There are 1 to 10 checkboxes and also a checkbox for all.

How do i select all so that all checkboxes (1 to 10) are selected.

here's the code from the first page

the code on the 2nd page to display the data is
$checkid= param("checkid");
print "ID = $checkid<br>";

how can i select all checkbox and all the checkboxes (numbered 1 to 10) are selected.
what do i need to do so that the checkboxes checked on page 1 are displayed on page 2.

Question by:plennon
LVL 48

Accepted Solution

Tintin earned 200 total points
ID: 16305199
This is a HTML question rather than Perl.

If you want all checkboxes checked, then do:

print <<EOF;
<input type="checkbox" name="IDr1" value="1" checked>1
<input type="checkbox" name="IDr2" value="2" checked>2

LVL 51

Assisted Solution

ahoffmann earned 200 total points
ID: 16314497
> how can i select all checkbox and all the checkboxes
do you mean "select in the browser" when seeing the page?
  then you have to use something like JavaScript

or do you mean write the checkboxes checked back from your CGI?
  see Tintin's suggestion


Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Suggested Courses
Course of the Month19 days, 4 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question