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.