Beta Draft: 2016-09-09

30.16 Legacy JavaScript APIs

Work has commenced to reduce the overall size of JavaScript that is loaded by Oracle Application Express when rendering a page. JavaScript functions that are no longer served on every page are gradually being moved to a legacy JavaScript file, which can be found in /i/libraries/apex/legacy.js.

When developing applications, a developer has the option to either include, or not include the legacy JavaScript functions. This is achieved by using the Include Legacy JavaScript property on the User Interface Attributes page under the application's Shared Components.

Existing applications are migrated with this option enabled, for backward compatibility. To not include this legacy file, you need to go through the functions listed in the legacy file, and search your application and associated JavaScript files for any references to those files. If you are happy that there are no references to these functions, you can switch off including the legacy file and benefit from the slightly smaller library.

When developing new applications, the legacy file is included by default in all applications that use a Desktop User Interface Type. New applications that use a jQuery Mobile Smartphone User Interface Type do not include this file.

For both new and existing application development, Oracle recommends that you do not continue to use any of the functions in legacy.js, to reduce your dependency on this legacy JavaScript.

30.16.1 $v_PopupReturn [Deprecated]

Sets the value of the item in the parent window (pThat), with (pValue) and then closes the popup window.

Note:

This function is deprecated. Instead, use:

apex.navigation.popup

For existing applications, the old function is still available, because of the application including the 'Legacy JavaScript' file (legacy.js). For details on how to control the inclusion of this file, see "About Database Applications" in Oracle Application Express Application Builder User's Guide.

Parameters

pValue (string)
pThat (DOM node | string ID)

Returns

Not applicable.

30.16.2 $v_IsEmpty [Deprecated]

Returns true or false if a form element is empty, this considers any whitespace including a space, a tab, a form-feed, as empty. This also considers any null value that has been specified on the item.

Note:

This function is deprecated. Instead, use:

isEmpty

For existing applications, the old function is still available, because of the application including the 'Legacy JavaScript' file (legacy.js). For details on how to control the inclusion of this file, see "About Database Applications" in Oracle Application Express App Builder User’s Guide.

Parameters

pThis (DOM Node | String)

Returns

[true | false]

30.16.3 submitEnter [Deprecated]

Submits a page when ENTER is pressed in a text field, setting the request value to the ID of a DOM node (pNd).

Usage is onkeypress="submitEnter(this,event)"

Note:

This function is deprecated. Instead, use:

apex.submit( { submitIfEnter : event })

See apex.submit for further details on how to use the 'submitIfEnter' pOptions property.For existing applications, the old function is still available, because of the application including the 'Legacy JavaScript' file (legacy.js). For details on how to control the inclusion of this file, see "About Database Applications" inOracle Application Express App Builder User’s Guide .

Parameters

pNd (DOM node | String | Array)

Returns

Not applicable.

30.16.4 setReturn [Deprecated]

Sets DOM items in the global variables returnInput (p_R) and returnDisplay (p_D) for use in populating items from popups.

Note:

This function is deprecated and due to very limited value there is no alternative.

For existing applications, the old function is still available, because of the application including the 'Legacy JavaScript' file (legacy.js). For details on how to control the inclusion of this file, see "About Database Applications" in Oracle Application Express App Builder User’s Guide.

Parameters

p_R
p_D

Returns

Not applicable.

30.16.5 GetCookie [Deprecated]

Returns the value of cookie name (pName).

Note:

This function is deprecated. Instead, use:

apex.storage.getCookie

For existing applications, the old function is still available, because of the application including the 'Legacy JavaScript' file (legacy.js). For details on how to control the inclusion of this file, see "About Database Applications" in Oracle Application Express App Builder User’s Guide.

Parameters

pName (String)

Returns

Not applicable.

30.16.6 SetCookie [Deprecated]

Sets a cookie (pName) to a specified value (pValue).

Note:

This function is deprecated. Instead, use:

apex.storage.setCookie

For existing applications, the old function is still available, because of the application including the 'Legacy JavaScript' file (legacy.js). For details on how to control the inclusion of this file, see "About Database Applications" in Oracle Application Express App Builder User’s Guide.

Parameters

pName (String)
pValue (String)

Returns

Not applicable.