PDA

View Full Version : xml opened from JavaScript


bbailey_33
06-19-2003, 07:14 PM
I am starting to play around with XML, so excuse my ignorance. I have an application which uses frames and JavaScript. I want a report to open in a new window using XML and XSL. I manully put these files together to get it right first. I then duplicated the element tags and order thru Javascript "document.writeln" statements and attempt to open it. It comes out displayed like plain text, totally ignoring my formatting in the XSL file, however, the "source" when viewed, is perfect. The name in the titlebar is the same as the frame/html where the drop-down-list box with which the user picks the report typeis located. I am assuming the problem I am experiencing is the browser sees this file as HTML, not XML because when the "viewed source" is saved to a local file and opened seperately from the app, it displays correctly. Am I having a MIME-TYPE problem? If so, how do I correctly make sure the new window is seen as XML?

p.s. I also posted this in the JavaScript forum

Alex Vincent
06-20-2003, 12:40 AM
bbailey: Please do not post the same question in two or more forums. It confuses people trying to help you and annoys moderators (like me).

http://www.codingforums.com/postguide.htm

I'm going to leave this thread open and ask for a mod to close your other thread and redirect here. In the meantime, can you post your source code? It's nearly impossible for us to diagnose what's going on without that.