variable outside the $.ajax({});? i tried return msg; after the condition and tried alerting it in the onsubmitCheckControlNumber() function but still not working.
<script type ='text/javascript'>
function onsubmitCheckControlNumber(){
var username = $("#ControlNumber").val();
$.ajax({
type: "POST",
url: "php/CheckControlNumber.php",
data: "username="+ username,
success: function(msg){
if(msg == 1)
{
$("form#FormUpload").submit();
}else
{
return false;
}
return msg;
}//END success: function(msg){
});//END of $.ajax({
}
</script>
This post has been edited by notice88: 24 June 2012 - 07:54 AM

New Topic/Question
Reply


MultiQuote


|