Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Drop-down box in PL/SQL? (kinda long!)
Thanks to all who replied. The htp.print('<TD>') solved the problem. The
htp.tableData tag is self-contained and throws in a </td> when you end any
htf.XXX line with a ;. The LOOP functionality requires a ; before it will
do its thing. The resulting code was REAL simple:
htp.print('<td>');
OPEN c_product; htp.formSelectOpen( cname => 'product_description1' ); htp.formSelectOption(' '); LOOP FETCH c_product INTO v_product_desc; EXIT when c_product%NOTFOUND; htp.formSelectOption(v_product_desc); END LOOP; htp.formSelectClose; CLOSE c_product; htp.print('</td>');
-----Original Message-----
From: Jamadagni, Rajendra [mailto:rajendra.jamadagni_at_espn.com]
Sent: Friday, May 05, 2000 9:01 AM
To: Multiple recipients of list ORACLE-L
Subject: RE: Drop-down box in PL/SQL? (kinda long!)
This is what I do .....
<sample>
htp.TableRowOpen; htp.print('<TD valign="top" rowspan="3">'); -- First we should display list of networks htp.print('<SELECT size=7 multiple name="net">'); open cur_log; loop fetch cur_log into rec_log; if cur_log%found then if rec_log.log_number_desc = '"** ALL NETWORKS **"' then htp.print('<option value="' || to_char(rec_log.log_number) || '" SELECTED>' || rec_log.log_number_desc); else htp.print('<option value="' || to_char(rec_log.log_number) ||
'">' || rec_log.log_number_desc);
end if; else exit; end if; end loop; if cur_log%isopen then close cur_log; end if; htp.print('</select>'); htp.print('</TD>'); htp.TableRowClose;
In my case I allow them to choose multiple values that's all. One with SELECTED is the one that gets highlighted ....
HTH
Raj
-- Author: Jamadagni, Rajendra INET: rajendra.jamadagni_at_espn.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You mayReceived on Mon May 08 2000 - 17:09:14 CDT
![]() |
![]() |