Ok so I am using bootbox which works perfectly, but when I want to send variables in a link with PHP then all javascript works but not the bootbox.
----This works----
<a href='#' class="alert_without_href">I dont have an href</a>
<script>
$(document).ready(function()
{
$('a.alert_without_href').on('click', function()
{
alert('This works');
bootbox.alert("This ALSO works");
});
});
</script>
----This doesn't work----
<a href="?name=Jacob" class="alert_with_href">I have an href</a><br><br>
<script>
$(document).ready(function()
{
$('a.alert_with_href').on('click', function()
{
alert('This works');
bootbox.alert("This one DOESNT work"); <---- PROBLEM IS HERE
alert('This also works');
});
});
</script>
----And then finally to display----
<?php
if ($_SERVER['REQUEST_METHOD'] === 'GET')
{
echo 'Hello ' . $_GET["name"];
}
?>
I do need to pass a variable in the link, it cannot be taken out. How can I fix this?
Thanks in advance
----EDIT---- I added an image of a table below with an explanation of what exactly has to be done
--ONLY READ IF YOU SAW THE IMAGE-- So each link under "Action" in the table creates a link with a variable of the user's unique ID. When it is clicked I check if $_GET['remove_id'] is set and then run a MySQL query to delete that person with that ID.
So basically the idea of Bootbox is to be a confirmation message if you want to delete the user, I don't want to use normal alert('') because that can be disabled.
p.s. the delete function does work, I just want to add a confirmation now using bootbox.