0

I'm a newbie on the frontend, I'm going to disable the button so add the disable property Its working fine in chrome but not working in IE11, My application is old so we use jquery 1.8, I tried both attr and prop and also google it there is no use. Anyone, please guide me, How can resolve it.

$("#update").prop('disabled', "disabled");

After submitting form

<button name="update" tabindex="26" disabled="disabled" class="inforFormButton upt_btn disabled" id="update" accesskey="U">Update</button>

Version

 IE11
 Jquery 1.8
  • As far as I remember the correct syntax ist prop('disabled', true) or false – Thallius Sep 27 '20 at 13:52
  • `prop` is for setting *properties*, and the reflected properties for boolean attributes use `true` and `false`, not strings. So to set the disabled attribute, you'd either use `.prop("disabled", true)` or `.attr("disabled", "disabled")` (or `.attr("disabled", "")` or basically any other string; what matters is the presence/absence of the attribute). – T.J. Crowder Sep 27 '20 at 13:54
  • 1
    Side note: jQuery 1.8 is ***massively*** out of date. It would likely be best to upgrade to the current version. – T.J. Crowder Sep 27 '20 at 13:55
  • @T.J.Crowder I tired above the three types but no use. My project is an old project so if I change the jquery version everything is collapsed. – venkat nallabirudu Sep 27 '20 at 14:25
  • Don't know what to tell you, `$("#update").prop("disabled", true);` definitely works with IE11 and jQuery 1.8: https://jsbin.com/hacokojuxa/edit?html,js,output – T.J. Crowder Sep 27 '20 at 14:35

0 Answers0