O'Reilly logo

Oracle and PL/SQL Recipes: A Problem-Solution Approach by Matt Arena, Josh Juneau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

14-12. Creating an Input Form with AJAX

Problem

You need a web application that can interactively retrieve data based on partial data entered by the user. The data must be retrieved before the user clicks the Submit button to process the page.

Solution

Use JavaScript and Ajax to dynamically retrieve data as the user enters data into the web form. This recipe uses the EMPLOYEES table in the HR schema.

The data entry screen is built with all managers in a single dropdown list, which includes a call to a JavaScript procedure that invokes Ajax to retrieve subordinate data. Once the user selects a manager, the employee dropdown list populates with the manager's subordinates. The subordinates' dropdown list is defined with an ID, which is required ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required