Not Defined!!!!!!

admin

Administrator
Staff member
From a form, an input box is sent to be validated with this code (in php) :

echo "<td>Agency Code:<input size="5" name="divcode" maxlength="5" onchange="isValidNEWUDC(this,$user_division_id);" value=http://www.webdeveloper.com/forum/archive/index.php/"$user_division_id START HERE!"></td>

Now this works...
It sends what the user entered to the validation, as well as their user code, which in the case i'm working on is L.

Here is the javascript validation:

function isValidNEWUDC(field, user_division_id) {
var divcode = field.value
var user_division_id = user_division_id.value;
var divLetter = divcode.substr(0,1);
if (divLetter !- user_division_id) {
alert ("DIVCODE not valid must begin with the first letter of your division")
field.focus();
field.select();
return false;
}
checkdivcode()
}


I am getting L is not defined as a javascript error.........
L is the suer's division.
What am i doing wrong???

Please help!
:D
 
Back
Top