I have a button where when user press, it shows yes or cancel if yes is pressed it redirects user to a url here is the code i am using
if (result.error == 2)
{
if (confirm(result.message))
{
location.href = '/user.php?act=add_booking&id=' + result.goods_id + '&spec=' + result.product_spec; //
}
}
Now i have installed Sweet alert 2 and i want to use it to confirm or cancel