i have following code:
if(isset($_POST['Button']) && (!empty($_POST['Button']))){
    echo '<script language="JavaScript">alert("ALERT MESSAGE");</script>';
    echo $classFunctions->Function($db, $_POST);
    echo '<meta http-equiv="refresh" content="0;URL=\'refertarget\'">';
}
but the alert message does not appear before the function is executed. Any suggestions how i can handle that alert message appears before the function will be executed?
thanks and regards
 
    