Hi,
I am creating a tool to merge xml files using xslt using Javascript/HTML.
Basically the user browses (browse button) to where there xml files are, then browses to where their xslt file (to perform an operation) is. Then they click an "apply" button and the result is output in a frame below.
My problem:
I have the tool working fine when I only have one input xml file (which is no good in a merge tool!!) but when I modify the code and add another xml field, the apply button will not work for two fields!
I think I haven't assigned the functions correctly to the xml fields/apply button. Heres some of the code I suspect is wrong, but im not sure where??
<table width="800">
<tr>
<td width="370">
XML File 1
<input type="file" size=15 id="xmlField1">
<input type="button" value="XML Src" onClick="ApplyStyleSheet(xmlField1.value, 'defaultss.xml');" id=xmlsrc name=xmlsrc>
XML File 2
<input type="file" size=15 id="xmlField2">
<input type="button" value="XML Src" onClick="ApplyStyleSheet(xmlField2.value, 'defaultss.xml');" id=xmlsrc name=xmlsrc>
</td><td> </td>
<td width="370">
XSL File
<input type="file" size=15 id="xslField">
<input type="button" value="XSL Src" onClick="ApplyStyleSheet(xslField.value, 'defaultss.xml');" id=xslsrc name=xslsrc>
</td></tr>
<tr><td> </td>
<td width="80">
<input type="button" value="Apply" onClick="ApplyStyleSheet(xmlField1.value && xmlField2.value, xslField.value);">
</td><td> </td>
</tr>
</table>
Any suggestions/advice/feedback would be greatly appreciated.
Many Thanks
Ciaran
PS Any more questions/need to see the file please email me.
I am creating a tool to merge xml files using xslt using Javascript/HTML.
Basically the user browses (browse button) to where there xml files are, then browses to where their xslt file (to perform an operation) is. Then they click an "apply" button and the result is output in a frame below.
My problem:
I have the tool working fine when I only have one input xml file (which is no good in a merge tool!!) but when I modify the code and add another xml field, the apply button will not work for two fields!
I think I haven't assigned the functions correctly to the xml fields/apply button. Heres some of the code I suspect is wrong, but im not sure where??
<table width="800">
<tr>
<td width="370">
XML File 1
<input type="file" size=15 id="xmlField1">
<input type="button" value="XML Src" onClick="ApplyStyleSheet(xmlField1.value, 'defaultss.xml');" id=xmlsrc name=xmlsrc>
XML File 2
<input type="file" size=15 id="xmlField2">
<input type="button" value="XML Src" onClick="ApplyStyleSheet(xmlField2.value, 'defaultss.xml');" id=xmlsrc name=xmlsrc>
</td><td> </td>
<td width="370">
XSL File
<input type="file" size=15 id="xslField">
<input type="button" value="XSL Src" onClick="ApplyStyleSheet(xslField.value, 'defaultss.xml');" id=xslsrc name=xslsrc>
</td></tr>
<tr><td> </td>
<td width="80">
<input type="button" value="Apply" onClick="ApplyStyleSheet(xmlField1.value && xmlField2.value, xslField.value);">
</td><td> </td>
</tr>
</table>
Any suggestions/advice/feedback would be greatly appreciated.
Many Thanks
Ciaran
PS Any more questions/need to see the file please email me.
Comment