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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:23:07+00:00 2026-05-27T04:23:07+00:00

Possibly a silly question, but how do I prevent a select element in a

  • 0

Possibly a silly question, but how do I prevent a select element in a form from showing its drop down menu when it’s clicked on? I tried the following:

$('select').click (function (e) {
    console.log (e);
    return false;
});

and

$('select').click (function (e) {
    e.preventDefault ();
    console.log (e);
});

But neither worked.

What am I doing wrong?

EDIT: The reason I need to know is for a jquery enhanced select element that needs to degrade gracefully. The idea is the select, when clicked, opens a jquery UI dialog with a nicely maked up list that the user makes their selection from (clicking a list item causes the select’s value to update). If JS is disabled then the select should just operate as normally.

The problem is that as well as the dialog opening, the dropdown also appears, which is not what I want. I can’t just disable the control, as its value needs to be submitted along with the rest of the form.

  • 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-27T04:23:08+00:00Added an answer on May 27, 2026 at 4:23 am

    I believe the best solution would be to replace the select element with something else to click on (a button or a link).

    BTW, you may want to look into the CSS 3 property appearance, which theoretically allows you to let that replacement element look like a dropdown. Support is however currently very limited:

    • http://css-infos.net/property/-webkit-appearance
    • https://developer.mozilla.org/en/CSS/-moz-appearance
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possibly a silly question, but I'm having no luck finding an answer. Using Visual
This might be a silly question, but, given the output of, say.. >>> from
It this possible? How? (Maybe silly question, but I couldn't find answer :( )
This may be a silly question but... Say you have a sentence like: The
This is an admittedly silly question, but I honestly don't know if this is
This is, perhaps, a silly question, but it's something that I've wondered about: is
I'm new to iPhone development, so apologies if this is a silly question, but
Silly question, but in a winforms app Im currently working on, I would like
Sorry if this is a silly and/or stupid question but... Will there ever be,
Might be a silly question, but I haven't been able to find an answer

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.