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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:17:32+00:00 2026-05-16T00:17:32+00:00

<a href=<?=$rowz[0]?> onClick=countLinks(‘<?=$row[6]?>’,'<?=$indexl?>’)>[Link <?=$j++?>]</a> The problem is that it doesn’t work with middle button

  • 0
<a href="<?=$rowz[0]?>" onClick="countLinks('<?=$row[6]?>','<?=$indexl?>')">[Link <?=$j++?>]</a>

The problem is that it doesn’t work with middle button on IE or firefox.
In fact, the countLinks using middle button is called only with chrome.

I think I need a Jquery function like mouseup event, just I don’t know how call that function, which it calls countLinks with those parameters parameters.

Any help?

  • 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-16T00:17:32+00:00Added an answer on May 16, 2026 at 12:17 am

    You’re right. You need a mousedown or mouseup event to determine which mouse button was actually clicked.

    But first of all, you need to get rid of that inline-event handler onclick and follow the shining road of unobtrusive javascript.

    Thatfor you need to give that anchor a id or class tag to identify it (Of course you may also choose to select that anchor with a css selector). Lets assume we have added a class with the name myClazzz 🙂

    javascript:

    $(function(){
        $('.myClazzz').bind('mouseup', function(e){
            switch(e.which){
               case 1:
                  alert('Left Mouse button pressed.');
               break;
               case 2:
                  alert('Middle Mouse button pressed.');
               break;
               case 3:
                  alert('Right Mouse button pressed.');
               break;
               default:
                  alert('You have a strange Mouse!');
            }
        });
    });
    

    The which property within a mousedown / mouseup event handler will contain a number which indicates which mousebutton was clicked.

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

Sidebar

Related Questions

How can you change the href attribute (link target) for a hyperlink using jQuery?
We want to allow normal href links to other webpages, but we don't want
We have a JavaScript function named move which does just windows.location.href = any given
Is there any way to follow a URL in JavaScript without setting the document.location.href
I have a case where i'm getting formatted text with <a href ...> ,
In jQuery, how do you select the <a> which href is pointing to the
Is it possible using jQuery to select all <a> links which href ends with

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.