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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:39:34+00:00 2026-05-26T08:39:34+00:00

Fiddle: http://jsfiddle.net/ugzux/ As you can see, I have a form with a disabled (via

  • 0

Fiddle: http://jsfiddle.net/ugzux/

As you can see, I have a form with a disabled (via javascript) submit button.

I want to be able to bind a click event to it anyway, so I can do some jazzy indication of what needs to be fixed on the input before I’ll allow the form to be submitted (i.e enable the button again).

However, disabling the submit button also apparently disables any click events bound to the button, even if they are bound after the disable – any idea how to get around this?

Practically, one solution is to stop disabling the button and instead have an event that does

$('form').submit(function(event){
    event.preventDefault(); 
});

However I want to know the ins and outs of disabled inputs and javascript events, and if there are workarounds as I’ve never encountered this behaviour before.

  • 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-26T08:39:35+00:00Added an answer on May 26, 2026 at 8:39 am

    Found this in this question –

    Firefox, and perhaps other browsers, disable DOM events on form fields
    that are disabled. Any event that starts at the disabled form field is
    completely canceled and does not propagate up the DOM tree. Correct me
    if I’m wrong, but if you click on the disabled button, the source of
    the event is the disabled button and the click event is completely
    wiped out. The browser literally doesn’t know the button got clicked,
    nor does it pass the click event on. It’s as if you are clicking on a
    black hole on the web page.

    I’d thought you might be able to ‘fake’ a click by wrapping the button in a div and firing the logic on the div’s click event. But, as indicated above, the events on disabled elements do not seem to be bubbled up the DOM tree.

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

Sidebar

Related Questions

I made this fiddle http://jsfiddle.net/nAb6N/10/ As you can see I have 2 animators ,
I have following fiddle: http://jsfiddle.net/BFSH4/ As you see there are two issues: The h1
I have this fiddle : http://jsfiddle.net/XjeCf/1/ that works like I want and this one
Here is a fiddle: http://jsfiddle.net/5s7vv/ What I want to do is have 2 buttons
See this fiddle: http://jsfiddle.net/uqJHf/ I have set the first column to show up with
Here is the fiddle: http://jsfiddle.net/7txt3/29/ I want to have the record needle on the
Fiddle: http://jsfiddle.net/8xBeW/1/ In the fiddle example you can see the idea I'm kind of
Fiddle: http://jsfiddle.net/GEzaD/ Why doesn't the loader disappear? And why can't I see the entire
I have this fiddle http://jsfiddle.net/xkXdy/ I want to have submenus for this dropdown Input
Please take a look at this fiddle: http://jsfiddle.net/hughbe/QYGcq/ As you can see, the label

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.