Chrome Javascript

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2012-06-30T15:13:17Z Indexed on 2012/06/30 15:15 UTC
Read the original article Hit count: 213

Filed under:
|

i have two spans on my page with class='hidden' and then some javascript to remove the class when a condition is met, its working fine in ie 9/10 and firefox but its not working in chrome when I run the function in the chrome JS console I get the message TypeError: Cannot read property 'attributes' of null

Anybody know whats going on?

<script type='text/javascript' >
function showhidden()   {

        var att =document.getElementById('hiddentextbox');
        att.attributes[0].value='';
        att =document.getElementById('hiddentextbox1');
        att.attributes[0].value='';
}</script>

Thanks

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about google-chrome