Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Drop-down box in PL/SQL? (kinda long!)
Good evening folks,
I'm trying to populate a drop-down box in a web page. I've tried all kinds of stuff (including RTFM - "Oracle PL/SQL Programming","Oracle Application Server" and "Oracle8, The Complete Reference"). I've tried OTN, and downloaded a bunch of .pdf stuff, but can't figure this out. Here's a sample of one of my iterations (I've tried quite a few):
OPEN c_employee;
LOOP FETCH c_employee INTO employeeRec; EXIT when c_employee%NOTFOUND; htp.tableData(htf.bold( htf.fontOpen( csizecattributes => ' tabindex="3"') ||
=> '-1') ||
'Employee ID: ' || htf.fontClose) || htf.formSelectOpen(cname => 'employee',
htf.formSelectOption(substr(employeeRec.employee,7)) ||
htf.formSelectClose); END LOOP;
This one gives me multiple option boxes, every selection creates a <td></td>. I've tried this (after the EXIT line):
IF c_employee%ROWCOUNT = 1 THEN htp.tableData(htf.bold( htf.fontOpen( csizecattributes => ' tabindex="3"') ||
=> '-1') ||
'Employee ID: ' || htf.fontClose) || htf.formSelectOpen(cname => 'employee',
htf.formSelectOption(substr(employeeRec.employee,7)));
ELSE htp.tableData(htf.formSelectOption(substr(employeeRec.employee,7)));
END IF; htp.formSelectClose;
This gives me the first name in a drop-down box, and the rest just written out in a line on the page. Anybody have an idea on how to this that they'd care to share?
Thanks,
David A. Barbour
Once a fledgling DBA, now forced by circumstances to be a piss-poor
Received on Thu May 04 2000 - 21:15:39 CDT
![]() |
![]() |