Page 1 of 1

return the value calculated in nuRunPHPHiddenWithParams

Posted: Tue Apr 13, 2021 5:06 pm
by kknm
How to return the value calculated in nuRunPHPHiddenWithParams from the form (RUN: IFrame) via nuJavascriptCallback in the inputbox on the main form.

Re: return the value calculated in nuRunPHPHiddenWithParams

Posted: Tue Apr 13, 2021 5:27 pm
by kev1n
Does this work?

Code: Select all

$yourValue = 'something';
$js = "parent.$('#ObjectID_parent_form').val('$yourValue').change();";
nuJavascriptCallback($js);

Re: return the value calculated in nuRunPHPHiddenWithParams

Posted: Wed Apr 14, 2021 7:37 am
by kknm
This works from js on iFrame, but doesn't work from nuPHPHiddenWhithParam. I would like to switch from PHP back to js to continue the calculations.

Re: return the value calculated in nuRunPHPHiddenWithParams

Posted: Wed Apr 14, 2021 8:12 am
by kev1n
Tested with http://demo.nubuilder.cloud/ and it works for me. Check out http://demo.nubuilder.cloud/ -> Objects Demo, Run iFrame (Form) Tab

Re: return the value calculated in nuRunPHPHiddenWithParams

Posted: Wed Apr 14, 2021 9:31 am
by kknm
Your IFRAME is on the BROWSE: EDIT Form and it works.
My Iframe lies on LAUNCH-form and it doesn't work. From PHP I can output nuDisplayError($ppp), but I can't even see

Code: Select all

$js = " nuMessage(['Help']); ";
nuJavascriptCallback($js);

Re: return the value calculated in nuRunPHPHiddenWithParams

Posted: Wed Apr 14, 2021 9:46 am
by kev1n
It even works on a Launch Form (User Home) for me.

Re: return the value calculated in nuRunPHPHiddenWithParams

Posted: Wed Apr 14, 2021 10:12 am
by kknm
Found an error ... I was reading in a loop from a file, as it seemed to me, one line ... but it had 1 more line with a space. :-))
Thank you for your understanding and patience!