Jump to content

VisionMaster

Members
  • Posts

    12
  • Joined

  • Last visited

VisionMaster's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi, I still can't figure out how to pull out a number value out of the XML. I have it displayed but can't use it as a varibale later in javascript... <script type="text/javascript"for="window" event="onload">var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")xmlDoc.async="false"xmlDoc.load("test.xml")nodes=xmlDoc.documentElement.childNodes;size.innerText= nodes.item(0).childNodes.item(2).text;</script> <div id="size"></div> - returns me the number 6 for example, the number which I need to use in another jscript . How can I convert it to Number ? Thanks!
  2. Finaly I did it! There was one line that fixed it. As boen_robot added in xsl.validateOnParse = false; in the XSL loading part, I've put one in the XML loading part - xml.validateOnParse = false; and now it works! Finally!
  3. And yet, still the same problem in IE :)p.s. I used the load this script http://w3schools.invisionzone.com/index.php?showtopic=1217 but it's not working in IE unitl I do something in the XML,put a space somewhere and then delete it for example, there is no logic in that!p.p.s. It works fine in Firefox and in Netscape, why IE has to be so ........!?
  4. Yup! That did it! Thanks boen_robot !
  5. (Mersi we maina , 6te go probvam po-kusno.)Thanks, I will try it out later. May be it is some bug with the parsing I'm not sure...
  6. I have document.getElementById("target").innerHTML = (htmll != null) ? htmll : "XSLT Failed!" which will tell me if it is empty or something is worng. But it seems that everything is OK. -I have just a blank page.-None of the pictures are displayed.-I DON'T have any error messages. Dudes, something bizzare has happened - I took my largest xml, deleted just one element of may be 100 elemnts in it, (i deleted the last one). And when I reloaded the page all the pics showed up, ofcourse except the last one. Then I just clicked "redo" at the xml to fix the XML file and then I tryed to load it again and it worked also with the last one- and it works forever, no matter if I close the IE , or if I delete the xsl and the html and copy them again it still works? and it got even more strange!!I just typed space somewhere in the xml randomly, then undo and then save. And it worked.
  7. Hi, I have the following problem. I have xml parser for IE and for FF to display pictures with xsl. In FF the parser works no matter what. In IE the parser works only with a small amount of pictures parsed from a smaller xml ?How is that possible and how can I fix it?Is it possible to create a preloader page before the actual script is executed?
  8. How exactly can I connect the examples that I gave ?
  9. Hi to all,I just wonder, is it possible, and if yes - how? If I have in a xml file for examle two tags/nodes like <XMLleft> 100px </XMLleft><XMLtop> 200px </XMLtop> and how can I then use them for example like this in the HTML : <div style="position:absolute;left:XMLleft;top:XMLtop;z-index:1; "> Bla bla </div> Thanks!
  10. Hi to all,I have this problem: I have a couple of xsl files telling the picture's sizes and then print them. In Firefox and in IE they all look the same-size and position. When I print from Firefox everything is as it supposed to be. In IE the pictures are printed in weird sizes - nothing according to the look I have in the browser. For example I have to have on one sheet (as I don in Firefox) [Pic1] [Pic2] [Pic3][Pic1] [Pic2] [Pic3][Pic1] [Pic2] [Pic3]And printed from IE it looks like this (in a whole sheet)[Pic1] [Pic [Pic1] [Pic//empty spacePics are somewhat double the size they appear in the browser..
  11. Problem solved, just used instead document.write(xmlDoc.transformNode(xslDoc));i used : target.innerHTML = xmlDoc.transformNode(xslDoc); in the function and in HTML <div id="target"></div> . The problem comes from document.write and changing the vars is not possible except if you create a new doc or somth....(:
  12. Hi, First of all I wasn't surewhere to post this, but I think it's more XSLT problem. Here is the function: <script type="text/javascript">var xmlDocfunction loadXML(xmlFile, xslFile){// code for IEif (window.ActiveXObject) {// Load XML var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async = false;xmlDoc.load(xmlFile);// Load XSLvar xslDoc = new ActiveXObject("Microsoft.XMLDOM");xslDoc.async = false;xslDoc.load(xslFile);// Transformdocument.write(xmlDoc.transformNode(xslDoc)); }else if (document.implementation &&document.implementation.createDocument) {.......For Firefox...... The problem comes when I want to call this function. <body><script type="text/javascript">function call(){loadXML('XMLdata.xml','XSLdata.xsl');}</script><input type="button" value="Call button"onclick="java script:call();"/><div style="padding:2px;" id="result"></div></body> I don't know where the problem is. When i manualy put the values it runs....Can I also put the result like in Firefox with innerHTML ?example:document.getElementById("result").innerHTML = (html != null) ? html : "XSLT Failed!"Thanks
×
×
  • Create New...