0

I try to make a script that click automatically the "CONFIRM" button when it appear on Jango.com

I tried:

document.getElementsByName("commit")[0].click();

But it does not work :(

Here's a screenshot with the button and code from the button

screenshot

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
Khado Mikhal
  • 602
  • 7
  • 14

1 Answers1

0

Try adding an onload event handler to your Javascript, like this:

document.getElementsByName("commit")[0].onload = function(this) {
    this.click();
}

More on this topic: http://www.w3schools.com/jsref/event_onload.asp

dhuang
  • 909
  • 4
  • 18