Welcome to the nuBuilder Forums!

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

save form without full redraw

Questions related to using nuBuilder Forte.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 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