0

Hi I'm using spring framework and jQuery, I have an array which store log of the process performing

arrayList Logs = ["Step 1..in progress","Step 1..Completed","Step 2.. in progress","Step 3 ..Failed"]

This array updates as the backend functions complete or failed, so I have tried to display it live while processing but failed so I just put this array in alert so it is displaying after the whole process gets completed. so is there any chance to display this ArrayList as live logging in frontend in a dialogue box or alert?

here is the code which I tried.

var log = ${Logs};
     if(log.length>0){
              var msg = "Summary: \n";
              for(var i = 0;i<log.length;i++){
                  msg = msg + log[i] +'\n';
              }
              alert(msg);
              ${Logs.clear()};
     }
paradox
  • 3
  • 1
  • Maybe this post could help you. https://stackoverflow.com/questions/14006136/execute-javascript-if-html-file-has-been-updated you need an ajax call with modified true. So it will recognize the file when the content changed. – Bernhard Beatus Aug 05 '21 at 14:35

0 Answers0