0 Replies Latest reply: Sep 30, 2013 8:20 PM by 979801 RSS

    ORACLE FORMS JAVASCRIPT INTEGRATION

    979801

      Hello experts,               I am new in oracle forms,Iam using oracle forms 11g with weblogic server 10.3.5 at windows 7. I

      have a oracle forms 6i application code which i have to migrate to oracle forms 11g.But I did not know about that what is this code.

      The code is given below:

      WHEN-CUSTOM-JAVASCRIPT-EVENT trigger:

      DECLARE

          eventName varchar2(30) := upper(:system.javascript_event_name);

          eventValue varchar2(100) := :system.javascript_event_value;

      BEGIN

          IF (upper(eventName)='EXIT') then

            closewindow;

          elsif (upper(eventName)='OPEN') then

              open_form(eventValue, activate);

          elsif (upper(eventName)='DATE_SELECTED') then

                  :EMP.hiredate:=to_date(eventValue, 'YYYY-MM-DD');

          elsif (upper(eventName)='COMMIT') then

                  commit;

          elsif (upper(eventName)='ROLLBACK') then

                  rollback;

              elsif (upper(eventName)='QUERY_ALL') then

                  clear_where_clause;

                  execute_query;

              elsif (upper(eventName)='ENTER_QUERY') then

                  go_block('EMP');

                  enter_query;

              elsif (upper(eventName)='CANCEL') then

                  abort_query;

              elsif (upper(eventName)='PREV_BLK') then

                  go_block('EMP');

                  PREVIOUS_BLOCK;

              elsif (upper(eventName)='NEXT_BLK') then

                  go_block('EMP');

                  NEXT_BLOCK;

            elsif (upper(eventName)='CLEAR_BLK') then

                  CLEAR_BLOCK;

          elsif (upper(eventName)='FIND') then

                  findEmpByEname(eventValue);

      elsif (upper(eventName)='PREV_REC') then

              PREVIOUS_RECORD;

      elsif (upper(eventName)='NEXT_REC') then

              NEXT_RECORD;

      elsif (upper(eventName)='SCROLL_UP') then

              UP;

      elsif (upper(eventName)='SCROLL_DOWN') then

              DOWN;

      elsif (upper(eventName)='INSERT_REC') then

              INSERT_RECORD;

      elsif (upper(eventName)='REMOVE_REC') then

              DELETE_RECORD;

      elsif (upper(eventName)='LOCK_REC') then

              LOCK_RECORD;

      elsif (upper(eventName)='DUPLICATE_REC') then

              DUPLICATE_RECORD;

      elsif (upper(eventName)='CLEAR_REC') then

              CLEAR_RECORD;           

      elsif (upper(eventName)='SHOW_KEYS') then

              SHOW_KEYS;           

      elsif (upper(eventName)='HELP') then

              HELP;               

      elsif (upper(eventName)='PRINT') then

              PRINT;       

      elsif (upper(eventName)='DISPLAY_ERROR') then

              DISPLAY_ERROR;               

       

      ELSE

          null;

      END IF;

      END;

      WHEN-NEW-FORM-INSTANCE trigger:

      web.javascript_eval_expr('parent.$("#cal_outer").show(200);');

      Thnak You

      regards aaditya