I want to show an error alert box inside the if block in jquery but error is coming. Can anybody help me here. I have found alert box from this website but in that case i have to click on Error Message Popup Alert to see the alert, but how can i add that Error Message Popup Alert alert inside my jquery if part so that without click that alert box will apear?
$("#textbox").keyup(function () {
$.getJSON('check.jsp', {
textboxname: this.value
},function(data){
if(data.isTrue){
$("#textbox").val(''); //clear the text box and show that Error Message Popup Alert
}
else{
//do something
}
});
});