Hi,

See attached code.

This will do the trick and hopefully is what your looking for.

Regards,
Dan.
<script>
function checkValue(theId) {
var numberOfElements=document.getElementById("myForm") .elements.length;
var theValueToCheck=document.getElementById(theId).val ue;

if(theValueToCheck>=0 && theValueToCheck <=10) {
for(i=0;i<numberOfElements;i++) {
if(document.getElementById("myForm").elements[i].value==theValueToCheck && document.getElementById("myForm").elements[i].id!=theId) {
alert("Value already used");
document.getElementById(theId).value="";
document.getElementById(theId).focus();
break;
}
}
} else {
alert("Rating is only between 1 and 10");
document.getElementById(theId).value="";
document.getElementById(theId).focus();
}
}
</script>

<form name="myForm" id="myForm">
<table>
<tr>
<td>Option 1</td>
<td><input type="text" onblur="checkValue(this.id)" size=2 name="order1" id="order1"></td>
</tr>
<tr>
<td>Option 2</td>
<td><input type="text" onblur="checkValue(this.id)" size=2 name="order2" id="order2"></td>
</tr>
<tr>
<td>Option 3</td>
<td><input type="text" onblur="checkValue(this.id)" size=2 name="order3" id="order3"></td>
</tr>
<tr>
<td>Option 4</td>
<td><input type="text" onblur="checkValue(this.id)" size=2 name="order4" id="order4"></td>
</tr>
<tr>
<td>Option 5</td>
<td><input type="text" onblur="checkValue(this.id)" size=2 name="order5" id="order5"></td>
</tr>
<tr>
<td>Option 6</td>
<td><input type="text" onblur="checkValue(this.id)" size=2 name="order6" id="order6"></td>
</tr>
<tr>
<td>Option 7</td>
<td><input type="text" onblur="checkValue(this.id)" size=2 name="order7" id="order7"></td>
</tr>
<tr>
<td>Option 8</td>
<td><input type="text" onblur="checkValue(this.id)" size=2 name="order8" id="order8"></td>
</tr>
<tr>
<td>Option 9</td>
<td><input type="text" onblur="checkValue(this.id)" size=2 name="order9" id="order9"></td>
</tr>
<tr>
<td>Option 10</td>
<td><input type="text" onblur="checkValue(this.id)" size=2 name="order10" id="order10"></td>
</tr>
</table>
</form>

Check Out : [url]www.cftagstore.com[/url] for the latest and greatest Coldfusion custom tags and components!

Built by developers, for developers!