Page 1 of 2
nuPopup - how to use it
Posted: Mon Jan 27, 2025 10:04 pm
by yvesf
Hi,
I want to use a function to open a browse and edit form as a popup. I tried nuPopup, but no popup appears regardless of the syntax I use. I found examples with 3 or 4 parameters on the forum, but they don’t work for me.
I have a main document where I’d like to open a popup, select predefined values, and insert them into a WYSIWYG field in the main document.
Is nuPopup the right method? If so, could you provide an example?
Thanks,
Yves
Re: nuPopup - how to use it
Posted: Mon Jan 27, 2025 11:37 pm
by kev1n
Re: nuPopup - how to use it
Posted: Tue Jan 28, 2025 1:00 pm
by yvesf
No it's a different question very basic in fact, I cannot even implement nuPopup. It's behind the button on the onclick event (custom code tab) on the main edit form.
Code: Select all
nuPopup('6797ea4743e083a', '', '');
and
FormId.png
No effect
Many thanks for providing me the right syntax and context of use. A small example will help a lot.
Yves
Re: nuPopup - how to use it
Posted: Tue Jan 28, 2025 1:07 pm
by kev1n
The syntax to open a popup window is correct.
Would it be possible to upload a dump of just this form (using the Cloner)?
And also dump the corresponding table (data can be excluded) so I can test it on my end to see if anything is flawed.
Re: nuPopup - how to use it
Posted: Tue Jan 28, 2025 2:30 pm
by yvesf
Here is the backup.
01-28-2025_122737_6798db49da5eb_nuBuilder_backup.sql.gzip
On fastform
- consultation button
- open a consultation
- behind motif button you have the script with nuPopup
Thx
Yves
Re: nuPopup - how to use it
Posted: Wed Jan 29, 2025 10:39 am
by kev1n
I installed your database and tested the popup. As you can see, it opens without any problems.
Re: nuPopup - how to use it
Posted: Wed Jan 29, 2025 9:14 pm
by yvesf
Sorry, I work too much, it was because I have implemented behind onchange event and not onclick event ....after having search around popup blockers and parameters in chrome and other devices tested with open.window.....I am sorry to have taken your time.....
How to open the popup in edit mode to create a new record ?
Thx again for your continuous help. Yves
Re: nuPopup - how to use it
Posted: Thu Jan 30, 2025 6:47 am
by kev1n
Pass a
2nd parameter "-1" to nuPopup() to open a new record.
Re: nuPopup - how to use it
Posted: Thu Jan 30, 2025 11:31 am
by yvesf

pops up always the browse form not the edit form.
Code: Select all
nuPopup('6797ea4743e083a','-1','')
Re: nuPopup - how to use it
Posted: Thu Jan 30, 2025 7:29 pm
by kev1n
I also executed `nuPopup('6797ea4743e083a', '-1', '');` on your database, and it successfully opens a new record in an Edit Form.
How is the code being executed on your end? Can you test it again? I don't see any reason why it shouldn't work.