Welcome to the nuBuilder Forums!

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

Popup from browse form

Questions related to using nuBuilder Forte.
Post Reply
chili666
Posts: 5
Joined: Wed Jun 13, 2018 12:58 pm

Popup from browse form

Unread post by chili666 »

Hi there,

what I am trying to do sounds quite simple - at least to me - but I only have very limited JavaScript and php knowledge, so I can't get it to work. What I would like to do is:

I have a browse/edit form and I am displaying that on a launch form. The corresponding edit form is supposed to open in a popup. So I tried all combination I could think of to get nuPopup to do what I want...

I settled on:

Code: Select all

nuPopup(5b508b1b49c4ad0,$('#Order_id'),.val());
this code is from a forum thread, that I found. The form-id is from the output of nuDebug(nuHash()); The edit form opens, but not as a popup...

What am I doing wrong?

And also: I`d like to update/refresh/reload the launch form on saving the popup-edit-form. How would I do that?

Thanks for your help - especially for being patient with somebody just getting into JavaScript :-)

Cheers!

Luis
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Popup from browse form

Unread post by admin »

Luis,

I'm not sure I understand.

Can you include a screen grab of what your Form looks like?

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Popup from browse form

Unread post by toms »

I run some tests by passing different parameters to nuPopup():

5afd3e2349b903f: a valid form id
5afaa13eb523846: a valid record id

Code: Select all

nuPopup('5afd3e2349b903f','5afaa13eb523846');

nuPopup('5afd3e2349b903f','5afaa13eb523846','');

nuPopup('5afd3e2349b903f','-1');

nuPopup('5afd3e2349b903f','-1','');

nuPopup('5b508b1b49c4ad0');
Result: Popup opens but its width is very narrow:
2018-07-20_082046.png

It just works like this, if I pass an empty record id:

Code: Select all

nuPopup('5afd3e2349b903f','');
You do not have the required permissions to view the files attached to this post.
chili666
Posts: 5
Joined: Wed Jun 13, 2018 12:58 pm

Re: Popup from browse form

Unread post by chili666 »

admin wrote:Luis,

I'm not sure I understand.

Can you include a screen grab of what your Form looks like?

Steven
Sure, it's a rather easy setup:

This is the browse form:
Image

This is the code I am using:
Image
As you can see, I spent some time playing with css as well :-)

This is the result of the code:
Image
NuBuilder keeps on opening the same form over and over. It is however the correct form.... and it's a popup :-)

This is the edit form - again nothing fancy....
Image

And another try at explaining what I am trying to do (my english is getting quite rusty, i fear):

The user opens the browse form, selects a record by clicking on it. The record opens as the edit form in a popup. The user makes his changes, saves the record and closes the popup.

To me it looks quite simple, but it is way above my veeery limited JavaScript knowledge....

Cheers,

Luis
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Popup from browse form

Unread post by toms »

You need to implement your own nuSelectBrowse() function and then call the nuPopup() function from there:

Example:
https://wiki.nubuilder.cloud/ ... lectBrowse

Ich hoffe das hilft...
chili666
Posts: 5
Joined: Wed Jun 13, 2018 12:58 pm

Re: Popup from browse form

Unread post by chili666 »

:D

Thanks.. yeah that's it - now it is working as expected....

Danke!
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Popup from browse form

Unread post by toms »

BTW, it's probably better to add the ccs styles for .nuCellEven and .nuCellOdd under setup -> header if you want all Browse Screens to use the same style:

Example: https://nubuilderforte.000webhostapp.co ... wse_screen
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Popup from browse form

Unread post by admin »

.
Post Reply