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 6603915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:04:52+00:00 2026-05-25T19:04:52+00:00

I have an image on a page. I cannot change the page. When you

  • 0

I have an image on a page. I cannot change the page. When you click on the images this page has, a function run and processes the image. The image is not a button. To make the image respond to clicks, the page developer added a listener to it. In fact, every image on that page has a listener. The listener is listening the “img” tag.

When you click on an image, the Javascript checks to see if that image should respond to a click and then runs or not a function.

I am developing some automation to fill the form where this image is. This automation script needs to fill the form and click on that image. How do I click on that image using javascript?

What should I look on the code to discover the method that runs when the image is clicked?

My problem is this: as the listener is attached to all images on that page but just some respond to the clicks, I suppose that the function attached to the listener has to receive a reference to the image that needed to be process… this is what complicates everything…

If you guys want, I can zip the page and the javascripts and put it here.

thanks

  • 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-25T19:04:53+00:00Added an answer on May 25, 2026 at 7:04 pm

    http://jsfiddle.net/efortis/9nmAR/

    $(document).ready(function (){
        $('img').click(function() {
            alert($(this).attr('alt'));     
        });
    
    
    $('img').eq(0).click();     // << I think this is what you need
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an image map in my page: <div id=books> <img src=images/books.png width=330 height=298
I have a page that has a large image on it with a number
i have a page for a small mobile site that has an image that
I have an image upload page (single page). When submitted it check filesize and
I have an image on my page and when the user hovers over it
I have a custom list, and I've added a 'Page Image' field by clicking
I have placed an image on the master page. I see the image at
I am having a image in one page and i have to crop the
I have a page with an image. I want the client to be able
I have a page that uses a background image to do rounded corners, and

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.