Changes

JavaScript AJAX Functions

2,567 bytes added, 16:32, 5 June 2015
no edit summary
* New Ajax function - "LiveSearchTable"
* New Ajax function - "InsertCount"
* New Ajax function - "dbInsertRecord"
fn_Ajax_BE_Process();
</source>
 
 
 
"dbInsertRecord"
 
This function allows you to transfer a value from one campaign into another. In the following example, the value of strCDA_638_field_0_1 is transferred into strCDA_41_field_0_1.
 
Worked example
 
<source lang="javascript" collapse="true" first-line="1">
 
var str_Company_Name = document.getElementById('strCDA_638_field_0_1').value;
if (typeof aryAjax_Settings=='undefined')
alert('Library did not load');
else {
aryAjax_Settings[0] = 'client_allnone'; //the client system
aryAjax_Settings[1] = '';
aryAjax_Settings[2] = '';
aryAjax_Settings[3] = '41'; //the ID of the campaign to transfer the data into
aryAjax_Settings[4] = 'null';
aryAjax_Settings[5] = 'null';
aryAjax_Settings[13] = -1;
aryAjax_Settings[14] = 'false';
aryAjax_Settings[15] = '';
aryAjax_Settings[16] = 'dbInsertRecord'; //the function to use
aryAjax_Settings[6] = 'intCurrentIdOfRecordInserted'; //The fields to be returned into the array
aryAjax_Settings[12] = 'intCDA_41_Id'; //The column names of those fields
aryAjax_Settings[17] = 'strCDA_638_field_0_33'; //The field on the source campaign which will contain the ID of the new inserted
//record after the ajax has executed.
aryAjax_Settings[22] = document.getElementById('intSystemGenerated_CompanyId').value; //ID of the company
aryAjax_Settings[23] = document.getElementById('intSystemGenerated_UserId').value; //The user's ID
aryAjax_Settings[24] = document.getElementById('intSystemGenerated_LoginKey').value; //
aryAjax_Settings[34] = 'strCDA_41_field_0_4'; //Fields to insert to
aryAjax_Settings[35] = str_Company_Name; //Values to insert
aryAjax_Settings[36] = ""; //Field to search on
aryAjax_Settings[37] = ""; //Value to search with
aryAjax_Settings[38] = "False"; //Add a CCl
fn_Ajax_BE_Process();
}
 
</source>