4 Replies - 353 Views - Last Post: 21 April 2013 - 01:24 PM Rate Topic: -----

#1 dragon40226  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 29-June 11

Clicking a HTML element without a name or id

Posted 21 April 2013 - 12:02 AM

Is it possible to do that? i have a website where i want to have it click a button but i can't do getelementbyid() or getelementbyname() because there isnt either.
Here is the button html code:
<td><button class='button small brown' type='button' onclick="$('#strength_q').val('100%');$('#defense_q').val('0');$('#speed_q').val('0');"><span>Use All</span></button></td>



There are multiple buttons like this on page so i dont think i can do it by type either.
Here are the other buttons on page:
<td><button class='button small brown' type='button' onclick="$('#strength_q').val('0');$('#defense_q').val('100%');$('#speed_q').val('0');"><span>Use All</span></button></td>


And last one:
<td><button class='button small brown' type='button' onclick="$('#strength_q').val('0');$('#defense_q').val('0');$('#speed_q').val('100%');"><span>Use All</span></button></td>


I want to have the program click the first button i showed.

Is This A Good Question/Topic? 0
  • +

Replies To: Clicking a HTML element without a name or id

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9365
  • View blog
  • Posts: 35,178
  • Joined: 12-June 08

Re: Clicking a HTML element without a name or id

Posted 21 April 2013 - 01:39 AM

So what game are you trying to.. er.. game?
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3596
  • View blog
  • Posts: 12,372
  • Joined: 12-December 12

Re: Clicking a HTML element without a name or id

Posted 21 April 2013 - 01:59 AM

Why click the button when you have the code right there :dontgetit:
Was This Post Helpful? 0
  • +
  • -

#4 dragon40226  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 29-June 11

Re: Clicking a HTML element without a name or id

Posted 21 April 2013 - 01:23 PM

View Postandrewsw, on 21 April 2013 - 01:59 AM, said:

Why click the button when you have the code right there :dontgetit:/>

Cause it is a bot for a game. and The game is Mafia Death
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9365
  • View blog
  • Posts: 35,178
  • Joined: 12-June 08

Re: Clicking a HTML element without a name or id

Posted 21 April 2013 - 01:24 PM

That's what I figured. We will not assist you violating the terms of use for that game. Please do not persist in continuing to ask for help here. I will be closing this topic, and if you need further explanation on the 'why' then shoot me a pm.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1