Html prompt message display is incomplete

send a request to the background during development. After a successful return, the page is refreshed and the pop-up prompt is successful. The
pop-up window often shows only one line and it ends.

at first

initPage();                 //
showInfo("");        //

then try to use Promise Synchronize

new Promise(function(resolve){
    init.initPage();
    window.onload = function(){   // 
        resolve();
    }
}).then(function(){
    showInfo("");
})

but all failed.

the actual code is developed using require.js sub-module

    // 
    function saveDevicesCallback(result){

      if(result.result == 0){
        // 
        new Promise(function(resolve){
          require(["event/device"],function(init){
            init.initPage();
          });
          resolve();
        }).then(function(){
          showInfo("");
        })
      }else{
          showError("");
      }
    }

want to see the page refresh first and then prompt the message box

Mar.30,2021

refresh the page starts all over again. You mean that if it is a local refresh, DOM operations are all performed by Synchronize, so there is no need to display information asynchronously


.

look at the meaning of the subject initPage () may have done something similar to window.reload () , that is, press the function of F5

.

if you redraw the page in this way, all the processes you mentioned above will be interrupted. It is recommended to deal with the method of initPage () , and do not let the page reload

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b33120-2b5e0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b33120-2b5e0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?