View Full Version : Javascript variables

05-04-2004, 09:06 AM
I found this javascript on the xml-dev forum and I have got it working with no problems.
But I want to modify it.
I am developing a web site (Apache +PHP) that displays a list of files using (quiXplorer) Php file manager. The files that are listed are raw Xml . When the file is selected by a check box and the edit button pressed it takes me to a screen showing the raw Xml. Here you can edit the raw xml and then save it but you can not preview it in it's finished format. Thats where the script below comes in.
The mod is as follows. Where as the script shows the file cdcatalog.xml I need to make it a variable (if that is right) so that the file displayed in the edit screen of my web page is passed to this script and then displayed with the press of a button.
The Xsl file will be static (global.xsl)
Am I asking the impossible :)

The IE method is :
<script type="text/javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false

// Load the XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false

// Transform