Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.chainon-marquant.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <1336691.W6u1xrnRel@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Fri, 10 Feb 2012 10:40:06 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit Subject: Re: Get attribute from HTA Newsgroups: comp.lang.javascript References: <-uOdnYr0A5Wf-anSnZ2dnUVZ_rSdnZ2d@westnet.com.au> <1371529.bfuUreu131@PointedEars.de> <89ednbWlvLntUanSnZ2dnUVZ_gydnZ2d@westnet.com.au> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 90 NNTP-Posting-Date: 10 Feb 2012 10:40:07 CET NNTP-Posting-Host: 5cc7e384.newsspool3.arcor-online.net X-Trace: DXC=C4Ndk[:_eQk]l@YUW5NBknMcF=Q^Z^V3h4Fo<]lROoRa8kF On 10/02/2012 1:02 PM, Thomas 'PointedEars' Lahn wrote: >> Andrew Poulos wrote: >>> If I have this in the head of a HTA >>> >>> >> id="test" >>> applicationname="Test" >>> icon="content/scripts/test.ico" >>> border="thick" >>> borderStyle="normal" >>> caption="yes" >>> contextMenu="no" >>> navigable="yes" >>> scroll="yes" >>> selection="no" >>> showInTaskbar="yes" >>> singleInstance="yes" >>> windowState="normal"> >>> >>> How do I get the value of 'scroll'? >>> >>> I tried >>> document.getElementsByTagName("HTA") >> >> This cannot work. `HTA' is the namespace prefix, not the element type >> name. Please get a minimum clue. > > I wish I knew a couple of percent of what you know :-( Only comes with experience. My assumption was that if I see a start tag where the first part has a colon in it, that is referring to XML namespaces: >>> and document.getElementsByTagName("HTA:APPLICATION") >>> >>> but both return 0 elements. >> >> Tough luck. >> >> document.getElementsByTagName("APPLICATION") should work as it also works >> in MSXML. Correction: "HTA:APPLICATION" might have worked as well. Because MSXML does not appear to be *fully* namespace-aware. I found that out when writing JSX:xpath.js and I had to trim the namespace prefix for the XPath expression with *user-defined* prefixes to work in Internet Explorer: (No line numbers yet; look for `else if (isMethod(contextNode, "selectNodes"))'.) >>> The answer appears to be, in my case, >>> >>> document.getElementsByTagName("head") >> [0].getElementsByTagName("APPLICATION")[0].scroll >> >> Why oh why on Earth are you asking, then? > > I was sharing what I thought was difficult-to-find info. ACK. >> RTFM: > > Far out, how do you find all these references. I googled and searched > MSDN and couldn't find it. I googled "HTA", which after a few not so useful links to "*H*ochschule Luzern - *T*echnik & *A*rchitektur" lead me to the German Wikipedia article [1], in which was a link to the MSDN Library as the first one in the section "Weblinks" [2]. Then as I saw that despite the German-language interface the referred content was in English, so I tried "en-us" instead of "de-de". This worked. Then I clicked on "border", and there it is. HTH PointedEars ______ [1] [2] -- Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) -- from (404-comp.)