Hello
In my search form I have two textboxes and next to each is a dropdown for Exact Match or Like.
The dropdowns are disabled initially and the user needs to enter some data in the respective textbox to activate it.
I had some help on doing this back in October 08 and the code worked, but when I went back to the page recently to do some amendments, the dropdowns are permanently disabled, regardless of what text is entered in the textboxes. The code is pasted below - can anyone identify what has gone wrong?
Pendle
<table border ="1">
<tr>
<td>surname</td>
<td><input name="surname" id="surname" size="30" maxlength="50" onblur="this.parentNode.nextSibling.getElementsByTagName('select')[0].disabled=!(this.value.length)" /> </td>
<td>
<select name="surname" id="surname" disabled="true" >
<option value="=" selected>Exact Match</option>
<option value="like">Like</option>
</select>
</td>
</tr>
<td>name</td>
<td> <input name="name" id="name" size="30" maxlength="50" onblur="this.parentNode.nextSibling.getElementsByTagName('select')[0].disabled=!(this.value.length)" /> </td>
<td>
<select name="name" id="name" disabled="true">
<option value="=" selected>Exact Match</option>
<option value="like">Like</option>
</select>
</td>
</tr>
</table>
In my search form I have two textboxes and next to each is a dropdown for Exact Match or Like.
The dropdowns are disabled initially and the user needs to enter some data in the respective textbox to activate it.
I had some help on doing this back in October 08 and the code worked, but when I went back to the page recently to do some amendments, the dropdowns are permanently disabled, regardless of what text is entered in the textboxes. The code is pasted below - can anyone identify what has gone wrong?
Pendle
<table border ="1">
<tr>
<td>surname</td>
<td><input name="surname" id="surname" size="30" maxlength="50" onblur="this.parentNode.nextSibling.getElementsByTagName('select')[0].disabled=!(this.value.length)" /> </td>
<td>
<select name="surname" id="surname" disabled="true" >
<option value="=" selected>Exact Match</option>
<option value="like">Like</option>
</select>
</td>
</tr>
<td>name</td>
<td> <input name="name" id="name" size="30" maxlength="50" onblur="this.parentNode.nextSibling.getElementsByTagName('select')[0].disabled=!(this.value.length)" /> </td>
<td>
<select name="name" id="name" disabled="true">
<option value="=" selected>Exact Match</option>
<option value="like">Like</option>
</select>
</td>
</tr>
</table>