Oracle APEX Tutorial 9 - JavaScript - Video Training
Filed Under Technical Tips // Tags: oracle apex, video training
Introduction
JavaScript is everywhere on the Internet today. Even if you don’t realize it, this handy little scripting tool has become one of the most used addons on the web, probably even in the web browser your viewing this article in. APEX also allows for the integration of JavaScript into applications, and this tutorial will cover some fo the ways this can be done. If you haven’t done so already, we reccomend you reference our article Oracle APEX Tutorial Preparation and OEHR Sample Data Installation prior to going through this video.
High Level Steps
1) Locations and Referencing (0:30)
2) Creating Example Application (2:23)
3) Adding A Simple Alert Window (4:32)
4) Adding A Dynamic Validation/ Form Element Alteration (6:45)
Times in parenthesis are approximate start times for that step
Notes and Information
Script Locations
The two main places in APEX you can put your scripts are in the page header, and in the page
template, with some differences. A raw script can be placed into the page header (or multiple
scripts) and can be easily referenced by anything on that page. If placed in the page template,
it is reccomended that you reference a .js file that contains the script(s) and understand that
placing the refrence in the template makes the scripts accesible to every page of the
application. Balancing access and security for these scripts is beyond the scope fo this
article, and you may need to consulty your security or IT department for the appropriate
guidelines.
Item Names and Labels
We need to ensure there is the understanding that an Item’s name and it’s label are two
different things, even if they are called the same thing. The Item Name is an absolute
identifier (like the MAC address on your network card), it never changes. The label on the
other hand is what is displayed to the end user, and can be altered and changed at your whim as
the developer.
Code and Pasted Text
Null Check Script
<script type="text/javascript"><!--mce:0--></script>
Last Name HTML Attribute
onblur="notNull(this);"
Disable Item Script
<script type="text/javascript"><!--mce:1--></script>
Department ID Form Element
onchange="disFormItems()"
Department ID List of Values
SELECT department_name, department_id FROM oehr_departments
HTML Body Attribute
onload="disFormItems(); first_field();"
Related Information:
- Oracle APEX Tutorial 4 – Form Layout – Part 2 – Video Training APEX gives you a lot of power and flexibility with it's built in wizards. They are very good at creating...
- Oracle APEX Tutorial 4 – Form Layout – Part 3 – Video Training APEX gives you a lot of power and flexibility with its built in wizards. They are very good at creating...
- Oracle APEX Tutorial 5 – Check Boxes – Part 1 – Video Training Within APEX, there are a multitude of things you can use Check Boxes for, and many ways they can be...
- Oracle APEX Tutorial 10 - Access Control - Part 2 - Video Training Security. We hear about it everywhere. Make this more secure, make this less secure. In the computer industry this is...
- Oracle APEX Tutorial 10 - Access Control - Part 1 - Video Training Security. We hear about it everywhere. Make this more secure, make this less secure. In the computer industry this is...
- Oracle APEX Tutorial 3 - Drilldown Report Part 2- Video Training This tutorial covers section 4 of the Oracle APEX Advanced Tutorials, Creating a Drilldown Report...
- Oracle APEX Tutorial 8 - Up and Downloading Files - Part 2 - Video Training Reports and data entry constitue the bulk of what most of these tutorials cover, and what many businesses need. However,...
- Oracle APEX Tutorial 3 - Drilldown Report Part 1- Video Training This tutorial covers section 4 of the Oracle APEX Advanced Tutorials, Creating a drilldown report...
