AJAX - Start Here
From All n One's bxp software Wixi
With Ajax, Web applications can send data to and retrieve from a server asynchronously (in the background) without interfering with the display and behaviour of the existing page. Data can be retrieved using the XMLHttpRequest object. Despite the name, the use of XML is not required; JSON is often used instead (see AJAJ), and the requests do not need to be asynchronous.
Basically AJAX allows a web page to retrieve information that was not supplied when the page was first drawn. There are many uses for this.
- It can help pages remain a lot smaller as not all of the data has to be on the page, when it first loads.
- It can be used to retrieve real time information for various uses
- It can be used to store data without having to leave the current page.
Pure AJAX can be used in bxp software (bxp) however it can be long and complicated to build. To speed things up bxp has a number of pre-built functions already integrated with the security of bxp to allow these functions to work. These functions are only currently available in the bxp forms.
2 Functions Available (Reference Information)
As part of the functionality there are a number of predefined functions. These are set in aryAjax_Settings
As the functions are detailed, please use the links where available for further details.
2.1 Listing (Displays)
|Table||AJAX_-_Function_-_Table||Draws a listing of records from another form facilitating passed parameters. e.g. List contacts in a table in company form.|
|LiveSearch||AJAX_-_Function_-_LiveSearch||The ability to put a single row of data with the ability to put a custom function on the button.|
|LiveSearchTable||AJAX_-_Function_-_Live_Search_Table||An extension of the LiveSearch function but displays the data in a table format, rather than one string.|
|LiveSearchKeyStatData||AJAX_-_Function_-_LiveSearchKeyStatData||Return of data in a delimited string suitable for use in the KeyStats module.|
2.2 Lookup functions
|Append||AJAX_-_Function_-_Append||Lookup data from a form and append it to data in a field in the current form|
|Insert||AJAX_-_Function_-_Insert||Lookup data from a form and insert it into a field in the current form|
|InsertCount||AJAX_-_Function_-_InsertCount||Lookup a summative count of records from a form and insert the counted amount into a field in the current form|
|Populate||AJAX_-_Function_-_Populate||Wipes a drop down list then populates the contents of the drop down list with values from another form. Text and value of the drop down list will be the same.|
|Populate_AltList||AJAX_-_Function_-_Populate_AltList||Wipes a drop down list then populates the contents of the drop down list with values from another form. Text and value of the drop down list can be populated with different values.|
|PopulateNoClear||AJAX_-_Function_-_PopulateNoClear||Adds to the contents of a drop down list with values from another form. Text and value of the drop down list will be the same.|
|PopulateNoClear_AltList||AJAX_-_Function_-_PopulateNoClear_AltList||Adds to the contents of a drop down list with values from another form. Text and value of the drop down list can be populated with different values.|
2.3 Record Management
|dbDeleteRecord||AJAX_-_Function_-_dbDeleteRecord||To allow the deletion of a CDA record from another form.|
|dbInsertRecord||AJAX_-_Function_-_dbInsertRecord||To allow the insertion of a CDA record into another form.|
|dbUpdateRecord||AJAX_-_Function_-_dbUpdateRecord||To allow the update of a CDA record in another form.|
3 How it works
- When you log into bxp and start a form, the page will draw based on the Form (Web Page is built on Form 1).
- When the page is executed in the clients browser, the AJAX can be activated and it works through the BEAPI to access data in any number of forms.
4 Array of Parameters
A full listing is available here AJAX_-_Full_Array_of_Paramters
It is possible to build entire solutions using AJAX
One useful concept that AJAX can facilitate is Centralised Listing Centralised_Listing
This is further detailed here AJAX_-_Security_engine
4.3 Error messages and feedback
For a more indepth discussion on this area AJAX_-_Error_messages_and_troubleshooting