Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Implement Checkboxes with PL/SQL.
I have tried this, hope it helps. (Workings in PL/SQL).
<input type="checkbox" name="chkbox" value="A"> -- selected <input type="checkbox" name="chkbox" value="B"> <input type="checkbox" name="chkbox" value="C"> -- selected <input type="hidden" name="chkbox" value="NA"> 1. Create an array to stored the values entered. Eg. type chk_array is table of varchar2(5) index bybinary_integer;
2. Upon form submission, retrieve the data, it will look something like
this within the url,
http://www.abc.xyz/DCD/owa/process.get_array?chkbox=A&chkbox=B&chkbox=NA.
3. Declaration of your procedure should look like this :
procedure get_array (chk_box chk_array) is
4. Use a loop to extract the results. Basically, conntinues to retrieve the entered input until a value "NA" is encountered.
Eg. LOOP cnt := cnt + 1; EXIT WHEN (chk_box(cnt) = 'NA'); htp.br; htp.p('CheckBox value : '||chk_box(cnt)); END LOOP;
This looks a bit messy and non-elegant, bit it WORKS.
Cheers.
Terrence Wong
Systems Developer
MediaData Systems Pte Ltd
george wrote:
> Has anyone implemented checkboxes with using PL/SQL for web
> development?
>
> I would like to find out how can I pass checkboxes (with multiple name
> and
> value pairs)
> to Oracle Webserver for database update.
>
> Variable declarations in procedure statements would help greatly.
>
> Any response is greatly appreciated.
>
> Please reply by email. Thanks!!!
Received on Tue Jul 01 1997 - 00:00:00 CDT
![]() |
![]() |