Page 1 of 1
nuJavaScriptCallback
Posted: Sun Sep 08, 2024 3:57 pm
by vario
Is there any way I can wait for completion of nuRunPHPHidden so that code from nuJavaScriptCallback will be next to execute?
Neil.
Re: nuJavaScriptCallback
Posted: Mon Sep 09, 2024 6:05 pm
by kev1n
If your code looks like this
Code: Select all
nuRunPHPHidden(...);
Other code here..
Change it to:
Code: Select all
nuRunPHPHidden(...);
function runOtherCode() {
Other code here..
}
and in PHP, call runOtherCode();
Code: Select all
nuJavaScriptCallback(' runOtherCode(););
Re: nuJavaScriptCallback
Posted: Tue Sep 10, 2024 9:53 pm
by vario
OK thanks. One other thing...
If the code is part of an onchange event, and then the event handling is over before the PHP returns (given that the code is then just a call to nuRunPHPHidden() followed by a function definition) is the function invoked by the callback then undefined?
Obviously just for the sake of argument the function isn't defined globally!
I might give it a try but some of this just confuses me...