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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:03:45+00:00 2026-05-13T15:03:45+00:00

I have a web page with a off-site links whose onclick events are handled

  • 0

I have a web page with a off-site links whose onclick events are handled by jQuery. The jQuery fetches the content of the page the link points to and inserts it into a div.

What I would like to do is be able to give somebody an url for this page that would cause the onclick event for one of the links to fire, thus loading the div with the remote page.

For example, say my page has the following markup:

<a class=link href=yahoo.com>yahoo</a>
<a class=link href=bekko.com>bekko</a>
<div id=div_where_remote_html_is_loaded></div>

…and jQuery code like:

$('a.link').click(function(){
  //code fetches remote html and adds to div
  }

Is it possible to specify an url to this page that would also cause the onclick event to fire for one of the links?

  • 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-13T15:03:46+00:00Added an answer on May 13, 2026 at 3:03 pm

    You could add an id to your links and use it as a hash on the url you want to give ..

    then use javascript to target the link in your page..

    <a class=link href=yahoo.com id="link1">yahoo</a>
    <a class=link href=bekko.com id="link2">bekko</a>
    <div id=div_where_remote_html_is_loaded></div>
    

    and after you assign the click event with your code add

    $('#' + location.hash ).click();
    

    The link you would give now would be the normal url with a #link1 at the end for the first link, like http://somedomain.ext/yourpage.htm#link1 ..

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

Sidebar

Related Questions

I have a web page in which people go to register for my site.
I'm trying to get off site content and display it on my web site.
I have a mvc web site that contains one non-mvc page (it is using
Let's say I have a web site for hosting community generated content that targets
I have web software where I need to have URLs like this http://site.com/page/var1/val1/var2//var3/val3 Then
I have web page in PHP which displays all records in a table. I
I have web page which is passing a querystring parameter to page 2: <a
I have a web page that includes a bunch of images. Sometimes the image
I have a web page which contains a select box. When I open a
I have a web page with DIV s with a mouseover handler that is

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.