I\'ve implemented a form which needs to disable certain options in a select box using Javascript. It works fine in all browsers but not in Safari on IOS (Desktop Safari does
I have a solution that may be helpful for you too, and it doesn't requires jQuery...
My problem was that the options were dynamically enabled and disabled, so the idea of removing the options by jQuery avoided them to be reused.
So my solution was to modify the innerHTML like this:
function swapAvailOpts(A, B) {
content = document.getElementById(B);
switch (A) {
case "X":
content.innerHTML = '';
break;
case "Y":
content.innerHTML = '';
break;
default:
content.innerHTML = '';
}
}