24-01-2009, 12:56 PM
Code PHP :
<?php
//Fontion affichage de message alert
function alert($mess, $title = 'La Vallée des Larmes', $url = 'log.php')
{
echo '<script language="javascript" type="text/javascript">
$(window).load(function(){
jAlert(
"' . htmlspecialchars($mess) . '",
"' . $title . '",
function(){
window.location.replace("' . $url . '");
}
);
});
</script>';
}
En utilisant la fonction de callback