Ajax on Scriptcase’s forms may be used to reload a select type field based in the value of another select type of field. It will filter one select field showing only the cities from a state selected in a previous select type of field.
CHECK the example running at THIS LINK
Select field using Ajax to reload select field
This example covers the development of a search application using the Ajax field reload.
Creating a new grid
1. Create a new grid application using the SQL Select Statement as below:
2. Select the Fields Positioning option in the application menu and choose U.EmployeeID, E.LastName, E.FirstName, E.Title, E.BirthDate, E.HireDate, E.RegionID, U.TerritoryID and E.Country fields.
Starting Grid application by Search
3. Open Grid folder and click in Grid Modules.
4. Set the Search as the initial module.
Choosing Search fields
5. Open the Search folder and click in Advanced Search >> Select Fields.
6. Choose E.RegionID and U.TerritoryID fields.
Search Fields Settings
7. Open U.TerritoryID field, in search fields.
8. Change Data Type attribute to Select.
9. Open the Search Lookup block and configure the settings according to the image below.
10. Open E.RegionID settings, modify the Data Type attribute to Select configure it as following .
Enabling Ajax to reload the field
11. Open the Ajax Processing block and mark the option “Use AJAX to reload…“.
12. Click “Run application”
Click the button below to view the application running.
Do you want to see more Scriptcase samples? Click HERE to visit our samples page.