AJAX functionality in PHPRunner

PHPRunner uses AJAX throughout generated web applications to update data and controls without reloading the entire page. AJAX-powered features include search suggestions, dependent dropdown boxes, lookup controls, details previews, and AJAX-based search, sorting, and pagination.

AJAX-based search suggestions

Search suggestions help users find values as they type. This feature is available on search pages and dynamically displays matching values without reloading the page.

The picture below demonstrates search suggestions on the Basic search page:

On the Advanced search page, search suggestions look like this:

By default, search suggestions can match the entered text anywhere in the field value. If you want suggestions to include only values that begin with the entered phrase, add the following code to the AfterAppInit event:

AJAX-based dependent dropdown boxes

PHPRunner supports dependent dropdown boxes where the available values in one field depend on the value selected in another field. The dependent values are loaded dynamically, so the application does not need to load every possible value when the page first opens.

Details records preview

PHPRunner can display details records directly from the List page without requiring the user to open a separate page. Hovering over the details link displays a preview of the related records.

Lookup wizard as an Edit box with AJAX search

For lookup fields with many possible values, PHPRunner can display an Edit box with an AJAX-powered suggestion list instead of a traditional dropdown. As the user types, matching values are retrieved from the database and displayed dynamically.

After you build the project, this control can be used on Edit, Add, and Search pages. When the user begins typing, an AJAX popup displays matching values that can be selected from the list.

By default, this lookup searches for values that begin with the entered text. If you want it to match the entered text anywhere in the value, add the following code to the AfterAppInit event:

If the user enters a value that does not exist in the lookup table and moves to another control, PHPRunner highlights the field so the value can be corrected.

AJAX search, sorting, and pagination

PHPRunner can also update List page data using AJAX. Search results, sorting, and pagination can be refreshed without reloading the entire page, making database applications feel faster and more responsive.

This option can be enabled in the List page settings by selecting AJAX search, pagination and sorting.

Build responsive database web applications with PHPRunner. Try PHPRunner free.