Re: Error Handling with Netscape
| From: | _lallous | Date: | Thu, 11 Oct 2001 10:56:32 +0000 |
| Subject: | Re: Error Handling with Netscape | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70768@lists.php.net to get a copy of this message | ||
try a javascript work around, which will clear the page and write the error
(when it occurs)
<script language="JavaScript">window.onload = new
Function('document.close();document.open();document.write("error occured:
msg msg msg!");');</script>
"Sharat Hegde" <shah@sonata-software.com> wrote in message
news:30402B4CB8C7D311A3C600C04F1513BCB4F611@bg2ipmail...
> Hello,
>
> In my PHP program, I have some processing to display items in a loop which
> is interspersed inside the Body of the HTML page. While doing this
> processing, if an error message comes up I "die" with the error message
> (Displays error message and quits).
>
> The error handling works fine on Internet Explorer but shows a blank page
in
> Netscape. I figured out that this is probably because all the HTML tags
do
> not have corresponding end tags. So I tried outputting "</body></html>"
> before the "die" statement in the error handler. This did not seem to make
a
> difference as there are still some open table tags, etc, ... which do not
> have correponding end tags.
>
> How do I get the error message to print on Netscape? Doing all the error
> handling before the HTML starts is too much of a problem as I have to
> duplicate code.
>
> Regards,
> Sharat
>