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
  • 86,878
  • 22
  • 220
  • 282
Khado Mikhal
  • 552
  • 5
  • 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

aznbanana9
  • 869
  • 4
  • 18