Personal tools

Log in

Changes

From All n One's bxp software Wixi

Jump to: navigation, search

AJAX - Start Here

4,818 bytes removed, 10:41, 29 August 2016
Array of Parameters
== Array of Parameters ==
 To save a lot of repeating code, the majority of the functionality use the same parameters.   All of the functionality A full listing is coded into the publicly available library fn_javascript_ajax_campaign.js. https://ww3.allnone.ie/library/javascript/fn_javascript_ajax_campaign.js  bxp creates an array to store the parameters. Not all parameters are being used by all functions.  <source lang="javascript"> //================================================================// Variable Initialisation//================================================================//Initialising the settings array, and for clarity explaining the elements of the array.//Simply copy this block of data into your code and replace the values with your system values//Not that the automation user MUST have an IP Address set for the system to work//-----------------------------------------------------------------------------------------aryAjax_Settingshere [0] = "client_demo"; //The system to usearyAjax_Settings[1] = "demo"; //The automation usernamearyAjax_Settings[2] = "password"; //The automation users passwordaryAjax_Settings[3] = "1"; //The Id of the campaignaryAjax_Settings[4] = "strCDA_1_field_0_0"; //The search fieldaryAjax_Settings[5] = "1"; //The search valuearyAjax_Settings[13] = "AJAX_-1"; //Id of the current record, used for delimiting and not repeating current casearyAjax_Settings[14_Full_Array_of_Paramters] = "true"; //Click through to campaign?aryAjax_Settings[15] = "divWarning"; //The id of the destination to which the table will be insertedaryAjax_Settings[16] = "Table"; //The default option is to create a table to display. The other options is Insert. Which will insert the values into the relevant fields. //The fields to be returned into the array//The column names of those fields//The first field must always be the ID of the campaignaryAjax_Settings[6] = "intCDA_1_Id,strCDA_1_field_0_0,strCDA_1_field_0_1";aryAjax_Settings[12] = "Id,Field 1,Field 2";aryAjax_Settings[17] = "intCDA_1_Id,strCDA_1_field_0_0,strCDA_1_field_0_1"; //For insertion, what local campaign fields will the data be transferred into. //-----------------------------------------------------------------------------------------// Extra settings fields used by the function, but made available globally for testingaryAjax_Settings[7] = ""; //Constructed URL for retrieveing dataaryAjax_Settings[8] = "-1"; //Error StatusaryAjax_Settings[9] = ""; //Error TranslationaryAjax_Settings[10] = "-1"; //Record countaryAjax_Settings[11] = ""; //Alternate Destination if required. Constructed just before use //-----------------------------------------------------------------------------------------aryAjax_Settings[18] = "true"; //Show table if empty? By default always show something.aryAjax_Settings[19] = ""; //Custom sort order if neededaryAjax_Settings[33] = ""; //Custom sort orderDESC aryAjax_Settings[20] = ""; //Custom group by if neededaryAjax_Settings[21] = "false"; //Limit to My Records onlyaryAjax_Settings[22] = ""; //Auto Login - SystemaryAjax_Settings[23] = ""; //Auto Login - UseraryAjax_Settings[24] = ""; //Auto Login - SessionId //--Live Search----------------------------------------------------------------------------aryAjax_Settings[25] = ""; //Field to Update (Id Value)aryAjax_Settings[26] = ""; //Function After UpdatearyAjax_Settings[27] = ""; //Field to Update (Display Text) //--Post Data Rerrieval Execution----------------------------------------------------------aryAjax_Settings[28] = ""; //Generic function call //--Live Search Format Options-------------------------------------------------------------aryAjax_Settings[29] = ""; //Buttons in the first column or the last column --> First/LastaryAjax_Settings[30] = ""; //Multi - button functionality --> Two coloursaryAjax_Settings[31] = ""; //Button Text (multi separated by ',' --> XXXXXXXX,XXXXXXXaryAjax_Settings[32] = ""; //Value for matching to show button 2 --> XXXXXXX //--Order Options----------------------------------------------------------------------------aryAjax_Settings[33] = ""; //Sort descending //--AJax Data Insert/Update/Delete Parameters----------------------------------------------------------------------------aryAjax_Settings[34] = ""; //Fields to insert toaryAjax_Settings[35] = ""; //Values to insertaryAjax_Settings[36] = ""; //Field to search onaryAjax_Settings[37] = ""; //Value to search witharyAjax_Settings[38] = ""; //Add a CClaryAjax_Settings[39] = ""; //divName //--All System Management Parameter--------------------------------------------------------------------------------------aryAjax_Settings[40] = "500"; //Total limit </source>  
== Functions Available ==
7,528
edits