473,473 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

the PHP die() function, HTTP packets, and Mozilla and XML

I'm writing an XML application at the moment and I'm trying to implement
exception handling - particularly fatal exceptions.

currently if a fatal exception is raised, I create error data in XML
format and then send the well-formed XML result document to the user
agent. I'm also careful to set the mime type to text/xml or
application/xml (I'm not sure how/if browsers treat them differently)
Immediately after sending this XML document to the browser, I call the
die() function to terminate script execution and make sure nothing is
sent after the end of the XML document. This helps to ensure that the
document is well-formed when the user agent finishes loading it.

This works a treat in IE. IE would display errors if it was not well-formed.

In mozilla (netscape7, firebird, etc.) I get blank (grey) window content
area. When viewing the source, I see a well-formed XML document. If I
don't use the die() function, then Mozilla renders it properly. Are
there any special requirements for how HTTP messages are terminated?
Could this be what die() is breaking?

Jul 16 '05 #1
0 1655

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Stephen Poley | last post by:
Apologies if this is a silly question, but Googling on the archive didn't produce any answers. I have a piece of inline Javascript which works as expected in IE 6, Opera 7, Mozilla and NN 4. In...
1
by: beavenour | last post by:
I am looking for some help creating a more universal function out of this lame attempt at javascript. I have little experience with javascript and want to be able to universalize this function. ...
1
by: Christian Radermacher | last post by:
Hi, the following code has the mentioned behaviour: <html> <head> <script type="text/javascript"> function newA() { for (i=0;i<3;i++) { var a = window.frames.document.createElement("a");
4
by: Thomas Mlynarczyk | last post by:
Hi, I stumbled over a strange behaviour of Mozilla. When I want to access the caller property of a function that was not called from within another function, Mozilla seems to abort the script....
1
by: ygy | last post by:
When I receive the UDP packets,and then Set the image pixel using Image::Setpixel(),but When I invalidate the interface to show the image,the UDP packets missed.How to solve the problem? thank you...
6
by: Ryan | last post by:
Hi, I am confused with how NetworkStream works. My application needs to handle heavy requests sent through TCP socket connection. I use NetworkStream.Read method to get the stream...
5
by: mike | last post by:
If I have a document like: <script> function mike_test() {alert('hi');} </script> <iframe src="blank.html" id="my_iframe1"> </iframe> and in blank.html I have:
2
by: Nikolai Wylutzki | last post by:
Hallo An alle obwohl ich hier in VB 6.0 entwickle sztelle ich diese frage in diesem Forum, da ich mir nicht anders helfen kann. In einem anderen Forum habe ich bis jetzt noch keine Antwort zu...
8
by: Olov Johansson | last post by:
I just found out that JavaScript 1.5 (I tested this with Firefox 1.0.7 and Konqueror 3.5) has support not only for standard function definitions, function expressions (lambdas) and Function...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.