I want to disable the next element of the parent of a tag:  

HTML:

```
<span>     
    <input type="checkbox" onchange="disableInput(this)">     
</span>
<input type="text" />
<!-- When checkbox changed, disable inputfield -->

```

Javascript:

```
<script>
    function disableInput(element){
        element.parentNode.nextSibling.disabled = true;
    }
</script>

```

This didn't work. Can someone help me?