I have created a procedure to pass in a value (eg: student ID) and an OUT variable from the procedure storing Yes/No to indicate if the student ID exist in the database or not.

I want to use this procedure in a javascript event handler (onChange) so that the user cannot update the student ID if it is already exists in the database.

I have written the following codes for the onChange javascript event handler in the portal form but it is not working! Any help pelase? Thanks!

for (i=0;i {
if (document.forms[0].elements[i].name ==
var v_student_id;
var v_valid;
v_student_id = document.forms[0].elements[i].value;
orcl.check_studentid(v_student_id, v_valid);
alert(v_student_id ||' '|| v_valid);