Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: (Q)Receiving values from checkboxes...

Re: (Q)Receiving values from checkboxes...

From: Ricardo Rocha <rrocha_at_usagate.net>
Date: 1997/03/16
Message-ID: <01bc31d6$6ef5dbe0$6464c7d0@rrocha>#1/1

When receiving multivalued variables (such as checkboxes or elements of an html table), the PL/SQL procedure is passed an argument of type OWA_UTIL.IDENT_ARR. OWA_UTIL.IDENT_ARR is actually a PL/SQL table of varchar2; that is, an array.

The relative position of elements within this array will be the same of the corresponding html variables.

Thus, if several checkboxes are given the same name (and, normally, different values), you can easily iterate through them as illustrated in the following piece of code:

PROCEDURE get_checkboxes(chkbox IN OWA_UTIL.IDENT_ARR) IS BEGIN

	FOR i IN 1..chkbox.COUNT LOOP
		IF chkbox(i) IS NOT NULL THEN
			htp.print(

'You checked box #' ||
TO_CHAR(i) ||
' whose value is: ' ||
chkbox(i) ); END IF; END LOOP;

END get_checkboxes; Received on Sun Mar 16 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US