Monday, 28 March 2016

JavaScript - fix the following error 0x800a138f - JavaScript runtime error: Unable to get property 'checked' of undefined or null reference

Watch this example on YouTube

JavaScript - fix the following error
0x800a138f - JavaScript runtime error: Unable to get property 'checked' of undefined or null reference

Replace
                var One = document.getElementById('rbOne');
                var Two = document.getElementById('rbTwo');    
                if (One[0].checked) {
With
                var One = document.getElementById('<%= rbOne.ClientID %>');
                var Two = document.getElementById('<%= rbTwo.ClientID %>');    
                if (One.checked) {

No comments:

Post a Comment