0

I am having a problem with safari browser. The alert message will show but no ok button in the alert box. It is only showing close and when close button was clicked it will show again. It keeps on showing when pressing close..

I am working with php and javascript. I have seen similar issues here in stackoverflow but I do not have any idea how to use WKUIDelegate.. Safari version is 10. I've seen it here here

Hope you can give me a guide how to solve this. here is the code that calls alert

$("#email").blur(function(){  
if(!validateEmail($(this).val())){
    $(this).css("background-color", "#FFFFFF");
    alert("Invalid email format");
    document.getElementById('email').style.color = "red";
    document.getElementById('emaillbl').style.color = "red";
    emailstat = "False";
    $("#submitBtn").prop('disabled', true)
    $("#email").focus()
}else{
    $(this).css("background-color", "#FFFFFF");
    $('.rez').text('').css("color", "blue");
    document.getElementById('emaillbl').style.color = "black";
    document.getElementById('email').style.color = "black";
    emailstat = "true";
        if(domainstat == "true" && phonestat == "true" && emailstat == "true"
            && citystat == "true" && ccodestat == "true"){
            $("#submitBtn").prop('disabled', false);                                                                                                                                                                                                         
        }else{
           $("#submitBtn").prop('disabled', true);
}
}
console.log(domainstat+" "+emailstat+" "+ ccodestat + " " + phonestat 
    + " " +citystat+ " "+countrystat );                                                                                                                                                                                                    
});

This is working fine in chrome and firefox

Community
  • 1
  • 1
pandoy
  • 33
  • 7
  • So are you saying that this line of code alone causes the problem: `alert("Invalid email format");` – musefan Oct 18 '16 at 13:46
  • all functions calling alert message.. I have other functions same with that and not working as well – pandoy Oct 18 '16 at 13:56
  • 1
    Yeah... so if you remove all your other code, and just have the `alert`, does it work? My point is, do we need all the reset of your nonsense code in order to replicate the issue? – musefan Oct 18 '16 at 14:05

0 Answers0