my form have a submit button bu i am'nt put that for you.
my test() function is in the php code and get its value from php function :
<?php
function myFunction(){
return $HTTP_POST_VARS["textfield"];
}
echo "<script language=\"Javascript\"> function test(){ return \"".myFunction()."\"; } </script>";
?>
i want to use this layout.
if it is not possible please help me on this qustion :
i have a registration page that the user enter his registration number in that page . when the user click on submit button,my page check that if the number is correct(in MySQL database) submit form and if isn't alert to user that the number is incorrect.
the code that checks this is in php and i want to use this for onSubmit in form.
thanks