I am trying to reload my web page after window.open('test.com') complete its processing. i have tried following code
try { window.open(scriptURL); //scriptURl is my which i want to open in new window. setTimeout(function () { location.reload(); //It's you code }, 4000); } catch (e) { nlapiLogExecution('error', 'Error requesting SLE', e.getCode() + ' - ' + e.getDetails()); alert('error: ' + e.message); return; } The location.reload() is dependent on window.open() once window.open() complete its processing then i want to reload my page.The above code is working fine. But the issue is that if window.open() take more than 4 sec its not work fine. setTimeout is not feasible solution because we are using hardcoded time. So can anyone help me out and come with best solution.