Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle Web Form Problem
I'm in desparate need of web forms help. Below is a description of my problem.
Scenario: I have a web form that allow users to retrieve records from the database. So far all the fields on this form are poplists.
Problem: I don't know how to dynamically populate values in one poplist based on the value selected in another poplist. Below are examples the cursors and the code used to build the poplist fields.
cursor curs_org_abrv_name is
select abbreviation, id from external_organizations
order by abbreviation;
cursor curs_org_name (abbrv_in VARCHAR2) is
select name, id from external_organizations
where orglevl_id2 = abbrv_in
order by name;
htp.bold( 'External Organization Abbreviation:');
htp.formSelectOpen( cname => 'ext_org_abrv_name_lov' );
for crec in curs_org_abrv_name loop
htp.formSelectOption( crec.abbreviation,
cattributes => 'VALUE="' || crec.orglevl_id2 ||'"');
end loop;
htp.formSelectOption( ' ',
cselected => 'TRUE', cattributes => ' VALUE="0"');
htp.formSelectClose;
htp.bold( htf.anchor(
'http://mapping.usgs.gov/internal/acis/agrmhelp.html#ext_org_name',
'Help'));
htp.br;
htp.bold( 'External Organization Name:');
htp.formSelectOpen( cname => 'ext_org_name_lov' );
for crec in curs_org_name loop
htp.formSelectOption( crec.name,
cattributes => 'VALUE="' || crec.id ||'"');
end loop;
htp.formSelectOption( ' ',
cselected => 'TRUE', cattributes => ' VALUE="0"'); htp.formSelectClose; Received on Thu Oct 22 1998 - 00:00:00 CDT