Running PHP5 on Ubuntu and some code using javascript fails. It worked at one time but updates to Ubuntu may have caused it to fail. I can't find what has changed that may be causing the problem.
This code in the program works:
<script type="text/javascript">
function redirect() {
window.location="<?php echo $_SERVER['PHP_SELF']; ?>";
}
</script>
This code in the same program does NOT:
function confirm($msg) {
echo "<script langauge=\"javascript\">alert(\"".$msg."\");</script>";
}
The alert box is partially displayed but the data in $msg is not. The space for the msg is void.
Does anyone have any suggestions?
PHP / Javascript Question
Moderator: General Moderators
Re: PHP / Javascript Question
An update to my previous post. This is a Firefox problem. The code works correctly if I use Safari or IE4 as the browser.
It works sometimes in Firefox if I hit the escape key while the alert box is displayed and the browser says that the page is still loading. Then when I resubmit the page the correct alert box displays.
It works sometimes in Firefox if I hit the escape key while the alert box is displayed and the browser says that the page is still loading. Then when I resubmit the page the correct alert box displays.