ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Ajax functions
  • Overview
  • AJAX management functions
  • Procedures that can be called by AJAX
  • WLanguage functions useless in AJAX
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
The diagram below presents the use of "programmed AJAX" in a WEBDEV site:
Execution of a browser process (AJAXExecute or AJAXExecuteAsynchronous).
Request to execute a server procedure.
Execution of the server procedure.
Generation of the result. The result of the procedure will be expressed as a character string or an XML document.
Sending of the procedure result (RETURN keyword).
Analysis of the procedure result.
Refresh modified data. Only the necessary controls are refreshed.
AJAX management functions
Several AJAX functions can be used to manage the complex processes in WEBDEV:
AJAXAsynchronousCallPendingDetermines if a server procedure called by AJAXExecuteAsynchronous is being executed.
AJAXAvailableUsed to find out whether the AJAX technology is supported by the current browser.
AJAXCancelAsynchronousCallCancels the automatic execution of browser procedure called by AJAXExecuteAsynchronous.
AJAXExecuteRuns a server procedure without refreshing the page. This function is locking. No process will be run as long as the procedure result run is not retrieved.
AJAXExecuteAsynchronousRuns a server procedure without refreshing the page. This function is not locking. The other processes continue to run (no matter whether the result of the procedure run is retrieved or not).

These functions allow you to run a server procedure from a browser process.
Caution: The information stored on the server must be consistent with the information displayed on the Web user's computer. For example, if data is modified, this data must be modified both on the server and on the page displayed in the browser.
Procedures that can be called by AJAX
To secure the WEBDEV sites, the server procedures are protected from illegal calls (attempt to re-route a session for example). To run a server procedure from a browser process (AJAXExecute or AJAXExecuteAsynchronous), you must allow this procedure to be called by AJAX.
To allow a server procedure to be called by AJAX, all you have to do is click "AJAX" in the bar of the procedure:
Procedure that cannot be called by AJAX
Procedure that cannot be called by AJAX
Procedure that can be called by AJAX
Procedure that can be called by AJAX
WLanguage functions useless in AJAX
All the functions available in WEBDEV server can be used in AJAX. However, the folllowing functions are useless in AJAX. Therefore, these functions are not available in AJAX.
ContextCloseCloses a page context
ContextOpenOpens a new page context without returning the information to the browser.
FileDisplayDisplays a file in the browser of Web user.
FramesetDisplayDisplays a WEBDEV frameset in the user's browser.
FramesetRefreshRefreshes a frameset displayed in the user's browser from the context on the server.
FramesetUseDisplays a WEBDEV frameset in the browser of the Web user and closes all the current page and frameset contexts.
InitWindowResets (or not) the controls found in the current page and runs the initialization processes of controls.
PageInitializationResets (or not) the controls found in the current page and runs the initialization processes of controls.
PageUseDisplays a WEBDEV page in the browser of the Web user and closes all the current page contexts.
ScriptDisplayCalls an external script (.php, .asp, .mhtml or .mht) and returns the result page in the current browser window.
StringDisplayDisplays a character string (or a buffer) in the browser.
UploadCopyFileSaves on the server a file "uploaded" by the Web user.
UploadFileNameReturns the name of a file "uploaded" by the Web user.
UseDisplays a page in the browser of Web user.

This list can evolve. It is recommended to check the documentation for each function. The logo indicates whether the function is available in AJAX.
Minimum version required
  • Version 10
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help