AjaxLoader, AjaxControlPostData and AjaxControlGetData


Function: AjaxLoader

It allows to get the content from any link address with Ajax and press it into the desired HTML element. It takes 2 parameters.

Parameter
Value
Parameter
type
Requirement
url
Link to get the content or a file path within the same system
String
E
element
The id of the HTML element that the content will be printed after being retrieved
String
E

Example Usage

AjaxLoader( 'https://wiki.workcube.com/help/9805', 'wikiContent');

Function: AjaxControlPostData

It sends parameters to any link address as formdata with Ajax via post method. When the Ajax request is terminated, it allows you to take action by using the values returned in the format. It takes 3 parameters.

Parameter
Value
Parameter Type
Requirement
url
Link to get the content or a file path within the same system
String
E
data
Parameter values expected by the requested connection address
FormData
H
callback
Function to be used for processing after request
Function
E

Example Usage

var data = new FormData();
data.append('wiki_id',9805)
AjaxControlPostData( 'https://wiki.workcube.com/help/9805', data, function( response ){
    console.log( response );
});

Function: AjaxControlPostDataJson

It sends parameters to any link address as formdata with Ajax via post method. When the Ajax request is terminated, it allows you to take action by using the values returned in JSON format. It takes 3 parameters.

Parameter
Value
Parameter Type
Requirement
url
Link to get the content or a file path within the same system
String
E
data
Parameter values expected by the requested connection address
FormData
H
callback
Function to be used for processing after request
Function
E

Example Usage

var data = new FormData();
data.append('wiki_id',9805)
AjaxControlPostDataJson( 'https://wiki.workcube.com/help/9805', data, function( response ){
    console.log( response );
});

Function: AjaxControlGetDataJson

It sends parameters to any connection address as formdata with Ajax with get method. When the Ajax request is terminated, it allows you to take action by using the values returned in JSON format. It takes 3 parameters.

Parameter
Value
Parameter
Type
Requirement
url
Link to get the content or a file path within the same system
String
E
data
Parameter values expected by the requested connection address
FormData
H
callback
Function to be used for processing after request
Function
E

Example Usage

var data = new FormData();
data.append('wiki_id',9805)
AjaxControlGetDataJson( 'https://wiki.workcube.com/help/9805', data, function( response ){
    console.log( response );
});

Feedback

Did you find this content helpful?