• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 646
  • Last Modified:

uncheck checkbox and disable in IE8

Hi,

Is there a way for me to detect if a user is using IE8 and if so disable and uncheck a checkbox?

Thanks
0
Al4ddin2
Asked:
Al4ddin2
1 Solution
 
Snarf0001Commented:
You can use conditional comments.  Only IE recognizes them, other browsers assume they're simple comments and ignore.


<!--[if lte IE 8]>
<script>
    window.onload = function () {
        var chk = document.getElementById("blah");
        chk.checked = false;
        chk.disabled = true;
    }
</script>
<![endif]-->
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now