How to make a button unclickable?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anil Kumars
    New Member
    • Feb 2011
    • 1

    How to make a button unclickable?

    Hi,

    I have a few buttons in a webpage. I want to dynamically disable the ability to click on one button. So the button is clickable only if a certain condition is met. Condition is the value of a variable like date or time. Can any one tell me how to do this with javascript?

    Thanks in Advance
  • dgreenhouse
    Recognized Expert Contributor
    • May 2008
    • 250

    #2
    the_element.dis abled = true; // Disables the button
    the_element.dis abled = false; // Enables the button

    Comment

    Working...