PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Automatic and immediate AJAX
  • Programmed AJAX
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
7. AJAX technology
Previous pageTable of contentsNext page
The AJAX technology is available in native mode in WEBDEV.
What is AJAX and what are its benefits ?
AJAX (Asynchronous Javascript and XML) is used to refresh the data modified in an HTML page without having to redisplay the entire page. For example, if some elements found in the page displayed (content of the cart, characteristics of a product, list of cities, map, etc.) are modified, only these elements will be refreshed. The server will not have to send the entire page to the user's computer.
This technology presents several benefits:
  • the server is less used. Therefore, it can support an important number of simultaneous connections.
  • the information that circulates is less bulky.
  • the transmission time is shorted.
  • the display is immediate and without visual effect for the Web user.
AJAX can be used at two different levels in a WEBDEV site:
  • Automatic and immediate AJAX: a simple click allows you to access the AJAX features. The code remains the same.
  • Programmed AJAX: functions for AJAX management allow you to write complex processes.
Note: Only sufficiently recent browsers support AJAX technology. AJAXAvailable is used to determine if the AJAX technology is supported by the current browser. If a process that uses the AJAX technology is run on a browser that does not support this technology, the process is run "as if" it did not use the AJAX technology (the entire page is refreshed for example).
Automatic and immediate AJAX
The diagram below presents the automatic and immediate use of AJAX in a WEBDEV site:
For example, a site page is used to find out the different characteristics of a country (capital city, currency, flag, location, etc.). The corresponding information is displayed according to the country selected by the Web user.
1Web user's action. In our example, the Web user selects the country in the "Select a country" combo box.
2Send the query to the server.
3Query execution: find the characteristics of selected country.
4Send the result of the request:
  • without AJAX: the entire page is returned.
  • with AJAX: the characteristics of selected country are returned.
5Display the characteristics of the country:
  • without AJAX: the entire page is redisplayed.
  • with AJAX: the controls containing the country characteristics are refreshed.
Programmed AJAX
The diagram below presents the use of "programmed AJAX" in a WEBDEV site:
1Running a browser process (AJAXExecute or AJAXExecuteAsynchronous).
2Request for running a server procedure.
3Run the server procedure.
4Generation of the result. The result of the procedure will be expressed as a character string or an XML document.
5Sending the result of the procedure (RESULT).
6Studying the procedure result.
7Displaying the modified information. Only the necessary controls are refreshed.
Previous pageTable of contentsNext page
Minimum version required
  • Version 23
Comments
Click [Add] to post a comment