Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

save form without full redraw

Questions related to using nuBuilder Forte.
kev1n
nuBuilder Team
Posts: 4565
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 529 times
Contact:

Re: save form without full redraw

Unread post by kev1n »

Can you give this a try? The variable openPopup is only defined if it is undefined.

Code: Select all

if(typeof openPopup === 'undefined') {
	var openPopup = false;
}

function fillSotrPopup(){
    let arrRows = nuSubformObject('sf_yavka').rows;
    let arrChecked = [];
    for (let index = 0; index < arrRows.length; ++index) {
        arrChecked.push(arrRows[index][1]);
    }
    localStorage.setItem("arrChecked", JSON.stringify(arrChecked));
    nuPopup('627e8e6691182e4', '', '');
}

function selectSotr(){
  if (nuIsNewRecord()) {
        openPopup = true;
        nuSaveAction();
    } else {
        openPopup = false;
        fillSotrPopup();
    }
}

function nuAfterSave(){
    if (openPopup === true) {
        openPopup = false;
        fillSotrPopup();
    }
}
Post Reply