My program opens 2-7 webpages after manipulating a portion of the url for each iteration (increments the date value in the url). I want my program to pause before it opens the next url. Ex: Opens URL 1 -> wait 1.5 secs -> Open URL 2...etc
My javascript function looks something like this:
function submitClicked(){
save current date in URL as variable
loop(4 times){
window.open(urlString); //open the initial URL
var newDate = getNextDay(date);
urlString.replace(date, newDate); (ex: if 2016-12-31 then replace it in URL with with 2017-01-01)
**wait 1.5 seconds**
}
function getNextDay(date){
...
return result (String value)
}
So basically, I want it to pause 1.5 seconds at the end of each iteration of the loop. I made the same program in Java and simply used Thread.sleep(1500);