Page 1 of 1

Popup from browse form

Posted: Thu Jul 19, 2018 4:04 pm
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

Re: Popup from browse form

Posted: Fri Jul 20, 2018 1:06 am
by admin
Luis,

I'm not sure I understand.

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

Steven

Re: Popup from browse form

Posted: Fri Jul 20, 2018 8:26 am
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','');

Re: Popup from browse form

Posted: Fri Jul 20, 2018 11:28 am
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

Re: Popup from browse form

Posted: Fri Jul 20, 2018 12:02 pm
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...

Re: Popup from browse form

Posted: Fri Jul 20, 2018 12:39 pm
by chili666
:D

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

Danke!

Re: Popup from browse form

Posted: Fri Jul 20, 2018 12:50 pm
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

Re: Popup from browse form

Posted: Sun Jul 22, 2018 11:47 pm
by admin
.