nuRunHiddenPHP
Posted: Tue Feb 20, 2018 8:58 pm
In the JavaScript on the form i have the following code
The PHP procedure has a java script callback which is
The callback does populate the operationdata with the information but not until (it appears) the entire JavaScript for the form has run.
So by the time it has received the data all the caculations have finished.
Is there away to process the java script on the callback as soon as the nuRunPHPHidden() has run - ie before the next statement?
Or is there a better way to achieve the above.
Code: Select all
var operationdata = 0;
nuSetProperty('GetOperationID', '6'); // set hash for php function
nuRunPHPHidden('GetOperationInfo', 1); //load data as JSON string and load into operationdata
console.log('Data: ',operationdata);
UpdateOrientation(); // updated orientation display field
UpdateSubCompOpacity(); // update opacity on new subform row.
UpdateComponentQty(); // relculate subform costs.
Code: Select all
$js = "
operationdata = $result;
";
So by the time it has received the data all the caculations have finished.
Is there away to process the java script on the callback as soon as the nuRunPHPHidden() has run - ie before the next statement?
Or is there a better way to achieve the above.