2 Replies Latest reply: Mar 15, 2011 5:49 PM by sky123 RSS

    custom javascripts when upgrading APEX from 3 to 4

    sky123
      Hi,

      I am referencing many external javascripts in my APEX 3.2 applications. Now, I am planning to upgrade the APEX engine from 3.2 to 4.0.2.00.07. I would like to confirm the following:

      1. I use the following a lot. Will it work in APEX 4? Is it appropriate to use html_GetElement('pFlowId').value in APEX 4?
      <pre>var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=???',0);</pre>

      Can I create the following JavaScript in Page 0 to make it work in APEX 4?

      <pre>
      function doSubmit(pWhat){
      apex.submit(pWhat);
      }
      </pre>

      2. I use "doSubmit('???');" a lot. Must I change it to "apex.submit('???');" after I have upgraded APEX from 3 to 4?

      3. When I call JavaScripts from report or select list, I always use the javascript: pseudo-protocol. For example, it may be like onchange="javascript:doWhat();". Is the javascript: pseudo-protocol necessary in APEX 4?

      Thanks.
      Andy
        • 1. Re: custom javascripts when upgrading APEX from 3 to 4
          fac586
          1. I use the following a lot. Will it work in APEX 4?
          Yes. It's included in the <tt>apex_legacy_4.0.js</tt> library for backwards compatibility.
          Is it appropriate to use html_GetElement('pFlowId').value in APEX 4?
          No. It has been superseded by the <tt>$x</tt> and <tt>$v</tt> methods, and by the inclusion of jQuery.

          >
          Can I create the following JavaScript in Page 0 to make it work in APEX 4?

          function doSubmit(pWhat){
          apex.submit(pWhat);
          }

          2. I use "doSubmit('???');" a lot. Must I change it to "apex.submit('???');" after I have upgraded APEX from 3 to 4?
          >

          <tt>doSubmit</tt> is included in the <tt>apex_legacy_4.0.js</tt> library for backwards compatibility.

          Existing applications should continue to run without modification.
          3. When I call JavaScripts from report or select list, I always use the javascript: pseudo-protocol. For example, it may be like onchange="javascript:doWhat();". Is the javascript: pseudo-protocol necessary in APEX 4?
          It has NEVER been necessary in event attributes. This is just wrong.

          See also +{message:id=9326152}+