Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 







Oracle Application Express (APEX): Calling JavaScript on Page Loading

Oracle Tips by Burleson Consulting

Calling JavaScript on Page Loading

The JavaScript source code shown above has a handy function you may want to reuse setFocus.  This function accepts a parameter of the page item name to set focus to.  The place you will call this code from is on Page Attributes page in the On Load region.  Navigate to the page attributes page for the Java Script application page and enter the text shown in figure X.2.  Then apply changes.

% Although the page attributes has a property named Cursor Focus that can be set to First item on page you may not want to set focus to the first item on the page.  For this reason the setFocus( ) function may be the option you will want to use.

You will likely need to change the name of the page item to match the name you have.  Now when the page is rendered the focus will be placed on the Username text field.



Figure X.2 Calling JavaScript on Page Loading.

Using the Page HTML Body Attribute will modify the <body> tag as shown here:


<body onLoad="javascript:setFocus('P4_USERNAME');">

APEX developer support:

For APEX development support just call to gat an Oracle Certified professional for all APEX development projects.

For more information on this topic, see the book "Easy Oracle HTML-DB Application Express ", the best book anywhere on expert APEX development:

Easy Oracle HTML-DB Application Express
By Michael Cunningham & Kent Crotty

Only $27.95

Buy it now and get the code depot download




Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational