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

  • SEARCH
  • Home
  • 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 6089319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:05:11+00:00 2026-05-23T12:05:11+00:00

In Google+, the button that is used to post a comment is made from

  • 0

In Google+, the button that is used to post a comment is made from a div:

<div role="button" id=":1vq.post" class="d-s-r tk3N6e-e tk3N6e-e-qc" aria-disabled="false" style="-webkit-user-select: none; " tabindex="0">Post comment</div>  

I think I can click it with:

document.getElementById(":1vq.post").click(); 

But it says that the element have no attribute click, and I found that onclick is null. So how could I click the button with JavaScript?

  • 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-23T12:05:11+00:00Added an answer on May 23, 2026 at 12:05 pm

    EDIT: After a chat with wong2 who started this question and a lot of failed guesses for what this question is really about (the question is quite poorly written), what they are trying to do is to write a Greasemonkey userscript to make the enter key press the Post Comment button in Google+ streams. Since I don’t have an invite into Google+ yet, I can’t even see the relevant code so not much I can do. This question is not about putting anything related to Google+ in your own site – it’s about trying to use Greasemonkey to modify the behavior of Google’s site in your own browser.

    Earlier attempts to help:

    id=”:1vq.post” is not a legal CSS id name. You can’t use the “:” character in a selector name. This causes multiple issues because not only is it not a legal character, but it’s also a meaningful character in the CSS selector syntax. So, I see that you have two issues.

    First, your selector logic is not working. Second, as others have said, you can’t just assign to click in this way with plain javascript (e.g. no framework).

    If you change your selector logic to work correctly, you can get it to work properly (using jQuery) like this:

    <div role="button" id="aPost" class="d-s-r tk3N6e-e tk3N6e-e-qc" aria-disabled="false" style="-webkit-user-select: none; " tabindex="0">Post comment</div>
    
    $("#aPost").click(function() {
        alert("I was clicked.");
    });
    

    And, you can see it in action in this jsFiddle: http://jsfiddle.net/jfriend00/Yfnc7/. Click Run and then click on the Post Comment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used this tutorial from Google to build a web app that finds
I have a button that launches the google maps app on my device via
I'm trying to write a dropdown form with a submit button that uses Google
I am loading a script from the google plus button only when the user
On my website there is a button that just used to call a function
I would like to put a button on top of a Google Map next
I have google analytics on my site. One page has a button which when
Here is the problem: Lets say a Jquery toggle button which loads a Google
Google results on this one are a bit thin, but suggest that it is
I'm trying to make test-program that opens a website by pushing a button. I

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.