var pcaNextAction=""; var pcaNextType=""; var pcaPrompt=""; var pcaResultType=""; var pcaIsError=false; var pcaErrorMessage=""; var pcaErrorNumber=0; //This array holds the names of each field in the response var pcaSchema = new Array (1); pcaSchema[0] = "error_number"; pcaSchema[1] = "message"; //One pca_X array is declared for each field in the response var pca_error_number = new Array (0); var pca_message = new Array (0); //This array holds the individual field arrays var pcaFields = new Array (1); pcaFields[0] = pca_error_number; pcaFields[1] = pca_message; //Number of records in the response var pcaRecordCount=1; pca_error_number[0] = "1"; pca_message[0] = "Account code was not recognised"; pcaIsError=true; pcaErrorMessage="Account code was not recognised"; pcaErrorNumber=1; //Invoke the callback function (pcaComplete is the default) pcaComplete();