Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1897930
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:42:18+00:00 2026-05-17T06:42:18+00:00

I need a javascript bookmarklet which can click on a button. The thing is,

  • 0

I need a javascript bookmarklet which can click on a button. The thing is, there are 100+ buttons on the page all with the same value. The name is unique but quite long.
The full name of the element is something like :

actions[http://apps.facebook.com/frontierville/giftaccept.php?next=giftaccept.php&senderId=1%3A1325206719&gh=3a8bfdace76051752a9127d1f9b43872&gift=nails&timestamp=1285598414&ref=tab&key=29b15e06ed9d7c00a8870c955ab938cf%24%24cfH1PUUZ%217bZYhg8M-o-XQc%218HHRMcvvyhuf4d%21.64qEvlQe&src=request&aff=gift&crt=nails&signature=6dd3fa03fe88f98b6dcab4faf4c7da94]

The value of every button is Accept and Play.

So. Is there a way to have it click on the button with a specific URL in the name?

Here is the source of the info for one of the buttons (got this from chrome’s inspect element feature):

<input value="Accept and Play" type="submit" name="actions[http://apps.facebook.com/onthefarm/giftaccept.php?senderId=1259413693&amp;gift=mysterygift&amp;timestamp=1285599906&amp;ref=gift_accept_tab&amp;key=78fcc7de3b36b8f9564262fab506893f%24%24ceK5RVRY61bZYhg8M-o-XQcyL%2CzHccEwEeuj4e-%21-dh0AD0A2AgyScd&amp;signature=32db959ce43f8330cf8fd992fbd53a51&amp;srcapp=FarmVille]">
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T06:42:19+00:00Added an answer on May 17, 2026 at 6:42 am

    This should do it…

    javascript:var nam=prompt("Give me a URL to look for"); nam="actions["+nam.replace(/\&amp;/g, "&")+"]"; var els=document.getElementsByName(nam); if(els.length == 0) alert("Button not found"); else els[0].click();
    

    It’s based on getElementsByName, here it is all spelled out…

    var nam = prompt("Give me a URL to look for");
    nam = "actions[" + nam.replace(/\&amp;/g, "&") + "]";
    var els = document.getElementsByName(nam);
    
    if(els.length == 0)
      alert("Button not found");
    else
      els[0].click();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a javascript bookmarklet that will click the Yes button on a facebook
I need to recognize a long click in a JavaScript bookmarklet. So, I cannot
Possible Duplicate: In need of JavaScript Solution for Exporting table to Excel which works
I need to use javascript to get the itemid of the current page in
I need help with Javascript. I need to replace however many characters there are
I am in need of a Javascript data structure which will allow me to
I'm trying to create a Javascript bookmarklet, which would extract a numeric ID from
I need to do what a bookmarklet does but from my page directly. I
When a user clicks on my green button, I need Javascript to detect this
I have the following javascript bookmarklet which opens a new popup window with a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.