Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

If Else Statement with Javascript

493904Feb 13 2007 — edited Feb 20 2007
I have procedure on the page which uses if and else to calculate a value for a field.

DECLARE
v_Fuel number;
BEGIN

if :P_AA = '21'
then
if :P129_CC < 1001 then v_Fuel := '110';
elsif :P_BB between 1001 and 1300 then v_Fuel := '140';
elsif :P_BB between 1301 and 1600 then v_Fuel := '160';
elsif :P_BB between 1601 and 1900 then v_Fuel := '170';
elsif :P_BB between 1901 and 2200 then v_Fuel := '180';
elsif :P_BB between 2201 and 3000 then v_Fuel := '210';
elsif :P_BB between 3001 and 4000 then v_Fuel := '230';
else v_Fuel := '300';
end if;
elsif :P_AA = '24'
then
if :P_BB < 126 then v_Fuel := '40';
elsif :P_BB between 126 and 450 then v_Fuel := '70';
elsif :P_BB between 451 and 850 then v_Fuel := '90';
else v_Fuel := '110';
end if;
elsif :P_AA = '23'
then
v_Fuel := '0';
end if;
:P_CCC := v_Fuel;
END;

My javascript is pretty basic. How do I write this in javascript so when I tab out of the P_BB field the new value appears in P_CCC.

Cheers

Gus
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2007
Added on Feb 13 2007
10 comments
2,093 views