Javascript Pop Up confirmation
Just a quick note, was working on a pop up confirmation box for a php site the other day.
print “<script>”;
print “if (confirm(\”Do you want to book a massage?\”))
{
self.location = ‘beauty.php?refno=”.$refno.”‘;
}
else
{
self.location=’info.php?refno=”.$refno.”‘;
}”;print “</script>”;
This will give you the option, ok and cancel, it seems like it’s a lot more work to have a yes/no option.
The code works fine and does the job it’s supposed to.