Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Submitting a dynamically created form with radio buttons
I am creating a web page which dynamically creates a set of Radio
Buttons based on a query. This is basically to rank the various values
in a table.
I am dynamically creating radio button groups and the radio button names are also dynamically created. My problem is that when i hit the submit button it needs to call a different stored procedure to insert/update the rankings and for that the input parameters in the called procedure should be exactly same in type and number as the parameteres passed when pressing the formsubmit button.
Since I am creating the radio buttons on the fly i dont know before hand how many sets of radio buttons will be there and hence i cannot determine what the input parameters for the called procedure should be. Is there any workaround for this kind of a problem. Please suggest.
Also i am attaching the code which i am using to generate the radio buttons.
CODE
create or replace package body codb_industryoperations as
procedure rankindustry_operations is
cursor industryCntCursor is select * from lkp_industry;
cursor operationsCntCursor (c_industry_id in number) is select
a.operations_id,a.description from lkp_operations a ,
int_industry_operations b
where a.operations_id=b.operations_id and b.industry_id =
c_industry_id;
begin
htp.print(head_title('Rank Industries/Operations')); htp.br; htp.br; htp.formOpen(curl =>
for i in industryCntCursor loop
htp.tableOpen;
htp.tableRowOpen;
htp.tableRowOpen; htp.tableData(generateRadio('PeerIndustry',2,'Enabled')); htp.tableData(head_small(i.Description)); htp.tableData(generateRadio('ind'||i.industry_id,2,'Enabled')); htp.tableData(generateRadio('ind'||i.industry_id,3,'Enabled')); htp.tableData(generateRadio('ind'||i.industry_id,4,'Enabled')); htp.tableData(generateRadio('ind'||i.industry_id,5,'Enabled')); htp.tableData(generateRadio('ind'||i.industry_id,6,'Enabled')); htp.tableData(generateRadio('ind'||i.industry_id,7,'Enabled')); htp.tableRowClose;
for j in operationsCntCursor(i.industry_id) loop
htp.tableRowOpen; htp.tableData(''); htp.tableData(j.description); htp.tableData(generateRadio('oper'||j.operations_id,2,'Enabled')); htp.tableData(generateRadio('oper'||j.operations_id,3,'Enabled')); htp.tableData(generateRadio('oper'||j.operations_id,4,'Enabled')); htp.tableData(generateRadio('oper'||j.operations_id,5,'Enabled')); htp.tableData(generateRadio('oper'||j.operations_id,6,'Enabled')); htp.tableData(generateRadio('oper'||j.operations_id,7,'Enabled')); htp.tableRowClose;
htp.tableClose; htp.br; htp.br;
htp.formClose;
end rankindustry_operations;
Function generateRadio(p_radioName in varchar2,p_value in
Number,p_attributes
in varchar2) return varchar2 is
v_radio varchar2(4000);
Begin
v_radio := htf.formradio(cname => p_radioName,cvalue => p_value,cattributes => p_attributes);
end codb_industryoperations;
/
show errors
Thanks
Ronnie
Received on Thu Nov 01 2001 - 16:10:18 CST
![]() |
![]() |