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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:37:02+00:00 2026-05-10T23:37:02+00:00

Background I’m using POST form submissions instead of links with concatenated arguments inside a

  • 0

Background

I’m using POST form submissions instead of links with concatenated arguments inside a Web application, so I can exercise control over input.

Unfortunately this means users can’t use the quick shortcuts they know to open links in new windows, like control-clicking or middle-clicking.

Problem

I’ve got what seems to be a workable way to use jQuery to capture mouse input and the various chord keys, based on the W3C DOM mouse events specification:

 $('span#clickspan').click( function(event) {     buttonpress = event.button;    ctrlpress = event.ctrlKey;      $('#clickresult').empty();     $('#clickresult').append('<p>Click!</p>');     $('#clickresult').append('<p>Button # ' + buttonpress + ' pressed!</p>');     if (ctrlpress) {         $('#clickresult').append('<p>Control-click!</p>');     }      //form submission code would go here      event.preventDefault();      }  ); 

I can capture control-clicks this way (tested in Firefox 3 and IE7), and it correctly (?) reports left-clicks as coming from mouse button #0, but for some reason this code still isn’t capturing middle-clicks on the span, and right-clicks still pop up the context menu. I’d like to capture middle-clicks, at least.

Can somebody help there?

What ‘control’ means

The problem with a GET submission/link with concatenated arguments is that anybody can edit the address bar and type in anything. I’ve already worried about authentication and validation server-side. That’s not why I want to work with POST.

I should only be showing users information that’s meaningful. Internal database IDs aren’t. I should only be letting users interact with the application in meaningful ways. Arbitrarily editing the address bar isn’t one of those.

People make typos all the time. From the system’s perspective, though, there’s no difference between a typo in the address bar and a flaw in the application logic, and I’d rather not push the responsibility for deciding which one just happened off onto the users.

  • 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. 2026-05-10T23:37:03+00:00Added an answer on May 10, 2026 at 11:37 pm

    Short answer? Can’t do it.

    Long answer? Javascript mouse events. Still can’t do it.

    This begs the question: do you need to use POST or do you simply want to? The only reason why you’d need to is query string length. As to wanting to, you mention ‘controlling user input’. What does that mean exactly?

    You should never ever ever rely on the browser for input validation. You can do it there as a convenience but the server should always validate input.

    Or is the reason aesthetic (ie shorter, ‘nicer’ URLs)?

    You’re reinventing the wheel that is hyperlinks. I’m just trying to make sure you have a pretty darn good reason for doing so because it’s counterproductive and you’re never going to get the same browser support and compatibility as actual hyperlinks. Plus you’re likely to simply annoy your users by having things they expect to work not work. Not good.

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

Sidebar

Ask A Question

Stats

  • Questions 64k
  • Answers 64k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer To my knowledge, there is no instruction which specifically 'drains'… May 11, 2026 at 10:59 am
  • added an answer SQL Server 2005 and up have a datatype called 'XML'… May 11, 2026 at 10:59 am
  • added an answer Check out jrefactory, and its command line option. May 11, 2026 at 10:59 am

Related Questions

Background: I have a little video playing app with a UI inspired by the
Background: I need to reserve an amount of memory below 0xA0000 prior to my
Background I am writing and using a very simple CGI-based (Perl) content management tool
Background I have a massive db for a SharePoint site collection. It is 130GB
Background I am trying to create a copy of a business object I have
Background I work for a large organization which has thousands of MS Access applications
Background I have been asked by a client to create a picture of the
Background : I am currently using custom controls within my C# project (basic controls
Background I am working on a legacy small-business automation system (inventory, sales, procurement, etc.)
Background: I have a kubuntu laptop right now that I can't use wirelessly, i.e.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.