prop("disabled", true); AND attr('disabled', 'disabled') is not working in chrome and firefox

jquery

Solution

Disabling a form is wrong! IE is just messing it out! you should disable fields.

function disableform(id) {
    $('#' + id+' :input').prop("disabled",true);
}​

DEMO

Problem

i have the following script inside my asp.net mvc view:- ``` function disableform(id) { $('#' + id).prop("disabled", true); } ``` But the above function will only disable the elements using internet explorer ,, but will fail to work on chrome or firefox, i also tried to write `attr('disabled', 'disabled')` instead of `.prop("disabled", true);`, but it did not solve the problem. my Jquery version is 1.7.1 So what might be the problem? BR

Original source