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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:42:49+00:00 2026-06-16T00:42:49+00:00

Im maintaining a site where I need to ‘click’ a link with javascript. The

  • 0

Im maintaining a site where I need to ‘click’ a link with javascript. The href is inline javascript, not a url so I cant just navigate to that url instead.

Im expect this is bad practice (the rest of the site is terrible!) but I need to make the link ‘clicked’ with javascript. Im using jQuery.

I know this question has been asked before but it seems normally people are trying to follow the link, which I am not.

  • 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-06-16T00:42:50+00:00Added an answer on June 16, 2026 at 12:42 am

    The smallest possible way I see, is find link by some finder, like by id, and call click on it:

    $("#my_link_id").click();
    

    But better would be to move that inline javascript from link into some function, and leave name of function in href of link, and on page load just call that saved function.

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

Sidebar

Related Questions

I am not very experienced with PHP. I have a site I'm maintaining that
Im maintaining a site with the link fragment below. There isnt an element with
I'm maintaining a web site for a non-profit organisation. I'm not the one who
Not quite sure how to troubleshoot this. I'm maintaining an ASP site, its mostly
I'm maintaining a Ruby on Rails site and I'm confused as to how to
I'm currently maintaining some web server software and I need to perform a lot
I'm maintaining an in-house ORM written in C#, and it currently does not have
I have an ASP.NET site that I am maintaining. Currently it has code that
I noticed that a site I'm maintaining had a little layout bug in FF/IE8/Chrome
The site I'm maintaining has been designed pretty rigidly using pixels for font sizes,

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.