Below is a snippet of javascript form validation code. This function is suppose to loop throw an array of input textbox name "order[] " to check for whether the values is empty and numeric but so far this function does not work and i do not know why.Pls help.Thanks a million.

code:
function validateForm()
{
// Find all the checkboxes...
var inputs = document.getElementsByTagName("order[]" );
for (var i = 0; i{
if ((document.inputs.elements[i].type == 'text')) {
if(isNaN(inputs[i].value))
{
alert("Please enter a valid numeric value" );
return false;
}
}
}
return true;
}
[/code]