The element is not available when you're trying to use it, as it hasn't been loaded in the DOM yet.
Move the script after the elements
<select name="client_select" id="client_select">
<option value="Name not listed">Name not listed</option>
<option value="1">abc company</option>
</select>
<span id="client_add"><input type="text" name ="" value="field1"/></span>
<script>
document.getElementById("client_select").onchange = function(e) {
if (this.value == 'Name not listed') {
document.getElementById("client_add").style.display = "";
} else {
document.getElementById("client_add").style.display = "none";
}
};
</script>
I would also encourage the use of addEventListener