Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140705

Click button when it changes to Active

$
0
0

Im currently trying to find a solution for my problem, I have a website were orders come in and there is a button which turns blue and I need to click it to accept all orders.

The logic behind it, it's a button which stays grey all the time, when a order enters it turns blue and active, and needs to be pressed. It's website in the browser.

window.onload=function(){

  setInterval(autoClick,100);

}
function autoClick(){
  if(document.getElementsByClassName("accept").length>0){
  document.getElementsByClassName("accept")[0].click();
}
}

I've started this but don't know how it shoud detect if the button turns blue.

Thanks in advance!


Viewing all articles
Browse latest Browse all 140705

Latest Images

Trending Articles



Latest Images