mercredi 29 juin 2016

Disabled Checkboxes still send check=true on iOS browsers(Chrome/Safari)

I'm programatically disabling a checkbox in JQuery:

(':checkbox').attr("diabled",true);

which works fine on desktop browsers i.e. doesn't send checked=true even though the check box was checked when I disabled it (shows a grayed out check).

However, on iOS - both Chrome and Safari - disabled seems to be ignored and checked=true is still getting sent.

I've tried disabling the checkbox in HTML and it works/doesn't work in the same way.

this works fine in desktop chrome/safari - but not in iOS.

 if($('myCheckbox').is(':checked')){
   console.log("is checked");
 } else {
   console.log("is not checked or is disabled");
 }

Is there anything I'm missing here?




Aucun commentaire:

Enregistrer un commentaire