I’m trying to validate a field using onbeforechange event. Everything is fine except, when I try to get the value from another input in the form. I get too much recursion error.
My code is as follows
attachEvent("onBeforeChange", function (id, old_value, new_value){
var alumno = getItemValue("id");
switch(id)
{
case "registro":
var xml = dhtmlxAjax.postSync("../data/alumnos.php","&op=repreg®istro=" + new_value + "&alumno=" + alumno);
if(xml.xmlDoc.responseText)
{
alertar(xml.xmlDoc.responseText);
return false;
}
break;
}
return true;
});
Any help would be appreciated. Thank you.