I am validating a form using PHP like this (part of it):
if (!($email)){
echo "<br />
<br />
<span class=\"difftext\">Please enter your E-mail!</span>";
exit();
}
Is there a way, by using Jquery, to display the msg without refresh my page or do I have to use totally Jquery validation?
Thank you
EDIT…
('#chkout', 'submit', function(){
$.ajax({
type: 'post',
url: 'help_scripts/prcd_chkout_ondelivery.php',
data: 'data',
success: function (){
$('#cust_order_result').html('data');
}
})
return false;
});
You can setup an AJAX call using JQuery. The AJAX call will allow you to do the server side verification without doing a page refresh.
Look up change and ajax in the JQuery manual to try to structure cod which will work for your case.