quote:
Originally posted by CookieRevised
ok, but it is way better to edit your first post and instead replace the old script with the new(est) version.
After that you can remove all the other attachments in your other posts, they aren't needed and people will still be able to download the wrong version.
(remember, not everybody reads an entire thread to know which version is which; mostly, if they see an attachment in a post (after they came directly to that post because they were referred to it fro manother thread), they probably think it is the latest version)...
Ok, done it.
quote:
Originally posted by SmokingCookie
1) yes.
2) also yes, but instead of "ControlLeft" and "ControlId" variables, you may wanna use an object with these properties:
code:
var Control = new Object();
Control.Id = xmlNode.getAttribute("Id"); // xmlNode in this case is K.item();
Control.Type = xmlNode.getAttribute("xsi:type");
Control.Position = {
"Left" : xmlPosNode.getAttribute("Left"),
"Top" : xmlPosNode.getAttribute("Top"),
"Width" : xmlPosNode.getAttribute("Width"),
"Height" : xmlPosNode.getAttribute("Height") // Note that there's no comma on this one
}// Object definition, version 2
Hang on, if "xmlNode" is "K.item()", then what's "xmlPosNode"?
quote:
Originally posted by SmokingCookie
About the enumeration thingy: there's probably only one node, so enumeration would be useless with "var CaptionsXPath = "//Interfaces/Window[@Id=\"" + WindowId + "\"]/Caption";" and such. You can retrieve the caption using the following code:
JScript code:
var CaptionXPath = "//Interfaces/Window[@Id=\"" + WindowId + "\"]/Caption"
var node = xml.selectSingleNode(CaptionXPath);
var sCaption = node.text;
1) You can use ".getAttribute()" to get a value from an "<element type="value"/>" tag, and ".selectSingleNode()" + "[node].text" to get a value from an "<element>value</element>" tag. Is this right?
2) Can I use ".selectSingleNode()" and "[node].text" to get any text in XML written as "<element>value</element>"?