PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
function setDeletemode(lkey)
{
mode = 'del';
//lang_key = lkey;
var answer = confirm("Are you sure you want to delete this item?");
if (answer){
return true;
} else {
return false;
}
}
the problem is that when i tried to delete a record, it returns nothing.please help.
It does nothing because the href attribute of the anchor where you call setDeletemode is empty. If you enter some URL it will open it on true or will not open it on false result from setDeletemode, which means if you click OK it will open the URL and if you click cancel it will not.
thank you for the reply.i have a function to delete a record, but unofrtunately, it was not handled when the delete link is clicked.how can i implement that?