[Chart]It does not work with IE, but works fine with Firefox

Dear Experts

G’day.

I use dhtmlx Grid and Chart.
Gird works fine with both browsers.
However I have problem with chart drawing.

Workflow
I draw chart with initial xml data(work fine) --(button action)–> I get data from Database and make xml and xsl ----> transform to XML using XSLTProcessor(work fine with firefox but does not work with IE).

	$xml = new DOMDocument;
	$xml->loadXML($sXML); 
	$xsl = new DOMDocument;
	$xsl->loadXML('aaa.xsl');
	$proc = new XSLTProcessor;
	$proc->importStyleSheet($xsl);
	echo $proc->transformToXML($xml);

Any help will be very appreciated.
Thanks.

p.s.
Specification
IE: version7
Firefox: Version 3.6.8
dhtmlx: dhtmlxSuite

Do you have

header("Content-type:text/xml");

somewhere before “echo” ?

If issue still occurs for you - can you provide a sample of problematic xml data.

Hi.
I added “header(“Content-type: text/xml”);”
However it still does not work.
I am not sure the position of “header(“Content-type: text/xml”);” is correct or not.
I will wait your response.

	$xml = new DOMDocument;
	$xml->loadXML($sXML); 
	$xsl = new DOMDocument;
	$xsl->loadXML('aaa.xsl');
	$proc = new XSLTProcessor;
	$proc->importStyleSheet($xsl);
	header("Content-type: text/xml");
	echo $proc->transformToXML($xml);

Please give me any advice if I am wrong.

Thank you.
p.s. xml

<?xml version="1.0"?>

APPLE115ASUS4CISCO45GM20FUJITSU2LG21ASIANA4LOTTE6TOYOTA141KIA5SUZUKI14

Same data works from static XML ( attached )

Position of header command looks correct ( it need to be executed before any output started )

Try to load the same php file directly in browsers - if output XML is not colored correctly - there is a problem with content-type.
1282046713.zip (14.1 KB)

G’day.

I tested with samples which you provided for me.
It works fine with firefox, but it still does not work with IE.(same as my current situation)
I am sorry but I am not sure how to solve it.
Could you please explain more detail how to configure “content-type”?

Thanks in advance.

Hugh

Sorry for inconvenience, above sample misses codebase/thirdparty/excanvas
Updated sample is attached.
1282046713.zip (27.1 KB)

Hi.

I tested your new sample code. It works fine with IE.
However it is not related with my problem. (I have “codebase/thirdparty/excanvas” in my “dhtmlxSuite”
Do you have any idea why my application does not work with IE(It works with Firefox).
Could you please explain more detail how to configure “content-type”?

Thanks.
Hugh

The sample uses exactly the same data - which means problem must be related to the way how it generated in your case.

Could you please explain more detail how to configure “content-type”?
Normally IE can process XML correctly only when it is provided with text/xml content type
If you are generating data dynamically - you need to exec special command which will assign such content type to the scripts output.
Such command must be issued before any output started.

You can test is it correct by loading script which generates xml directly in browser, if data was sent without content type - browser will not render it as XML ( will show an error, or render it as plain text )