MD RAFI

MD RAFI

  • NA
  • 14
  • 4.5k

Java script is not working in Google chrome.

Aug 31 2012 1:50 AM
Dear friends,

When  i am check box checked , i want to hide the div in in asp.net. am using below script and its working fine but its not working in Google chrome . please help me.

<script type="text/javascript">
        function valid() {          
        var checkboxnmae=document.getElementById("<%= checktrue.ClientID %>");
            var contents = document.getElementById('content');
            var form = document.getElementById('forms');           
            var labelname = document.getElementById('<%= lblheadername.ClientID %>');
            if (checkboxnmae.checked == true) {
                contents.style.display = 'none';
                form.style.display = 'block';
                contforms.style.display = 'none';
                labelname.style.display = 'none';
                document.getElementById('<%= Label1.ClientID %>').style.display = 'inherit';
            }
            else {
                contents.style.display = 'block';
                form.style.display = 'none';
                contforms.style.display = 'block';
                document.getElementById('Label1').style.display = 'none';
                labelname.style.display = 'true???';
                document.getElementById('<%= Label1.ClientID %>').style.display = 'none';               
            }
        }
    </script>

Answers (2)