DHTMLX Docs & Samples Explorer

disableItem(name, value)

Disables item.

Parameters:

  • name - the id of item (the item's parameter 'name')
  • value - the value of a radio button ( the radio's parameter 'value'). Required for 'radio' items only
formData=[{type: "input", label: "Login"},
          {type: "input", label: "Password"},
          {type: "button", name:"loginButton", value: "Log in", command:"Login"}];
myForm = new dhtmlXForm("myForm", formData);
...
function disableButton() {
          alert("You have exceeded the maximum number of login attempts for this session.")
          myForm.disableItem("loginButton");
}

See also: