AJAX - Function - Live Search Table
Revision as of 19:47, 19 March 2014 by Philip Lacey (talk | contribs) (Created page with " This AJAX function gives the user the ability to draw a data table with one of two custom buttons that only display when certain criteria are met i.e only allow the user to s...")
Revision as of 19:47, 19 March 2014 by Philip Lacey (talk | contribs) (Created page with " This AJAX function gives the user the ability to draw a data table with one of two custom buttons that only display when certain criteria are met i.e only allow the user to s...")
This AJAX function gives the user the ability to draw a data table with one of two custom buttons that only display when certain criteria are met i.e only allow the user to select a customer where the customers account is set to live.
/*************************************
Function:
*************************************/
function fn_PopulatePrivateHospitalTable(){
document.getElementById('HospitalListPrivate').innerHTML = '';
if (typeof aryAjax_Settings=="undefined")
alert("Library did not load");
else {
aryAjax_Settings[0] = ""; //Your system name
aryAjax_Settings[1] = ""; //The CMI API Username
aryAjax_Settings[2] = ""; //The CMI API User password
aryAjax_Settings[3] = "1"; //The Id of the campaign
aryAjax_Settings[4] = 'strCDA_1_field_0_0';
aryAjax_Settings[5] = document.getElementById('strCDA_2_field_0_59').value;
aryAjax_Settings[13] = "-1"; //Id of the current record, used for delimiting and not repeating current
aryAjax_Settings[14] = "true"; //Click through to campaign?
aryAjax_Settings[15] = "HospitalListPrivate"; //The id of the destination to which the matching links will be inserted
aryAjax_Settings[16] = "LiveSearchTable"; //The types of processing
aryAjax_Settings[6] = 'intCDA_1_Id,intCDA_1_Id,strCDA_1_field_0_1,strCDA_1_field_0_3';
aryAjax_Settings[12] = 'Id,Hospital Name,Post Code,AMH';
aryAjax_Settings[17] = 'intCDA_1_Id,intCDA_1_Id,strCDA_1_field_0_1,strCDA_1_field_0_3';
//Use my login to allow me to search
aryAjax_Settings[22] = document.getElementById('intSystemGenerated_CompanyId').value; //Auto Login - System
aryAjax_Settings[23] = document.getElementById('intSystemGenerated_UserId').value; //Auto Login - User
aryAjax_Settings[24] = document.getElementById('intSystemGenerated_LoginKey').value; //Auto Login - SessionId
//LiveSearch fields
aryAjax_Settings[25] = "strCDA_2_field_0_60"; //Field to be updated when live option clicked
//Live Search Format Options
aryAjax_Settings[29] = "Last"; //Buttons in the first column or the last column
aryAjax_Settings[30] = "Green,Red"; //Green/Red button functionality
aryAjax_Settings[31] = "Select Hospital,Not Available"; //Button Text (multi separated by ','
aryAjax_Settings[32] = "0"; //value for matching to show button 2
fn_Ajax_BE_Process();
}
}