Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Question - URGENT
On Sat, 25 Sep 1999 00:49:56 +0800, "Jason Ekamper" <jasek_at_bigpond.com> wrote:
>Having a bit of a problem with the following code. This is a checkbox for
>passing whether a resource is availible on monday or not.
>
>DECLARE BLOCK
> MON varchar2(4):='';
>
>BEGIN BLOCK
> htp.tablerowopen;
> htp.tabledata('Monday', cattributes => ' width="77%"');
> htp.tabledata(htf.formcheckbox('MON', cvalue => '', cchecked => MON),
>calign => 'left');
> htp.tablerowclose;
> htp.tableclose;
>
>PROBLEM DESCRIPTION
>Mon is then passed to another procedure. If user select monday, no problems.
>If the user doesn't select monday, then the procedure fails. Overloading not
>a problem, but there is 7 variables like this (Mon - Sun). I have tried an
>array etc but no luck.
>
>Is there any way to set the value of the checkbox to 'N' if the user does
>not select it, and set it to 'Y' if the user does select it?
Sort of. What you need to do is change the procedure that accepts the submission of this form to default the value of MON to 'N'.
eg.
procedure accept_form(
MON varchar2 default 'N',
TUE varchar2 default 'N',
..
SUN varchar2 default 'N' ) is
begin
if MON <> 'N' then
hope this helps.
chris.
>
>Any help much appreciated. Thanks
>
>Jason Ekamper
>Jasek_at_bigpond.com
>
--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.
![]() |
![]() |