The following code is working correctly on localhost, but not on the server. I think ‘confirm’ is a kind of plugin function.
var ask = confirm('Are you sure');
if (ask){
$('.loading_gif').show();
$('.delete_link').hide();
return true;
}
else{
return false;
}
I want to use some built-in function to do same thing. How can I do this?
Thank you
confirmis a javascript method to provide a prompt with an ok, or cancel button (browser dependent i think). theif(ask)statement checks to see ifask = true, when thecancel prompt's ok buttonis clicked, it returnstrueto the function,if cancel button is clickd, false returns. This is not a problem with the scope of this function.