When I click on Logout link, my logout.php file is called which logs me out.
<a href=logout.php>Logout</a>
How can I call following javascript function before calling the logout.php file on the click of the Logout link.
Javascript function
function callMeBeforeLogout()
{
alert("Do you really want to logout?");
}
onclickevent handler:<a href=logout.php onclick="callMeBeforeLogout()">onclickevent and forhrefyou may want to usejavascript:;.