OK.. yes the Trigger is Button: dupeCheck pressed
If I cant figure it out I will see if he wants to pay for a Premier ticket.
Thanks.
He just cant afford a premier ticket right now. Let me show you what I have and if I could at least get your opinion.
I have started taking some online classes on jquery and ajax so I am trying but cant quite figure this one. The dialog box keeps reopening and I dont want to check 'prevent this page from creating additional dialogs'. Is this just because I am using the default dialog box?
It does find the duplicates, just fine.
the license box uses this onBlur="isUnique(this.value)"
process2.php
<?php require_once('../Connections/conn_mdb1.php'); ?>
<?php
if(isset($_POST['licenseNumber'])){
$licenseNumber = $_POST['licenseNumber'];
$sql = "select * from maintbl where licenseNumber='$licenseNumber'";
$result = mysqli_query($conn_mdb1 , $sql);
if($result->num_rows > 0){
echo "This License Number is already in use";
}
}
?>
and the script.
<script>
function isUnique(licenseNumber){
$.post("process2.php" , {licenseNumber:licenseNumber} , function(data){
if(data != "")
alert(data);
});
}
</script>