How can I use a javascript confirm() function when asking a user if he is sure he wants to delete a record?
So far i've tried a variation of the following:
echo ("<script language =\"JavaScript\">"
echo ("var del="
echo("confirm(\"Really\""
echo("if (del)"
{$rs=delete_record(blah.....);
}
echo("else"
{
echo("alert(\"Delete cancelled\""
}
echo("</script>"
Any help or suggestions welcomed
So far i've tried a variation of the following:
echo ("<script language =\"JavaScript\">"
echo ("var del="
echo("confirm(\"Really\""
echo("if (del)"
{$rs=delete_record(blah.....);
}
echo("else"
{
echo("alert(\"Delete cancelled\""
}
echo("</script>"
Any help or suggestions welcomed