Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

return the value calculated in nuRunPHPHiddenWithParams

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

return the value calculated in nuRunPHPHiddenWithParams

Unread post by kknm »

How to return the value calculated in nuRunPHPHiddenWithParams from the form (RUN: IFrame) via nuJavascriptCallback in the inputbox on the main form.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: return the value calculated in nuRunPHPHiddenWithParams

Unread post by kev1n »

Does this work?

Code: Select all

$yourValue = 'something';
$js = "parent.$('#ObjectID_parent_form').val('$yourValue').change();";
nuJavascriptCallback($js);
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: return the value calculated in nuRunPHPHiddenWithParams

Unread post 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.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: return the value calculated in nuRunPHPHiddenWithParams

Unread post 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
You do not have the required permissions to view the files attached to this post.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: return the value calculated in nuRunPHPHiddenWithParams

Unread post 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);
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: return the value calculated in nuRunPHPHiddenWithParams

Unread post by kev1n »

It even works on a Launch Form (User Home) for me.
You do not have the required permissions to view the files attached to this post.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: return the value calculated in nuRunPHPHiddenWithParams

Unread post 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!
Post Reply