Does anyone know if there is a way of getting javascript to wait until I have pressed ok on an alert before it runs the next line of code?
The site I am developing is in PHP but I have made this function to bring up a message box:
function message($msg) {
echo "<script language='javascript' type='text/javascript'>";
echo "alert('".$msg."');";
echo "</script>";
}
This is fine unless I change the header location in the next line in PHP as it automatically changes the page with showing the message.
Any suggestions?