Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #11544

Re: Get attribute from HTA

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> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
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<OcfhCOkN7R:9EjSaToDZm8W4\YJNlb@mF9jNikde0N0Tg=^RAQlGl\D`T821Wo
X-Complaints-To usenet-abuse@arcor.de
Xref x330-a1.tempe.blueboxinc.net comp.lang.javascript:11544

Followups directed to: comp.lang.javascript

Show key headers only | View raw


Andrew Poulos wrote:

> On 10/02/2012 1:02 PM, Thomas 'PointedEars' Lahn wrote:
>> Andrew Poulos wrote:
>>> If I have this in the head of a HTA
>>>
>>> <HTA:APPLICATION
>>>     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:

<http://www.w3.org/TR/REC-xml-names/>

>>> 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:

<http://PointedEars.de/websvn/filedetails.php?repname=JSX&path=/trunk/xpath.js>

(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:<http://msdn.microsoft.com/en-us/library/ms536476(VS.85).aspx>
> 
> 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] <http://de.wikipedia.org/wiki/HTML-Applikation>
[2] <http://msdn.microsoft.com/de-de/library/ms536471(en-us,VS.85).aspx>
-- 
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 <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Get attribute from HTA Andrew Poulos <ap_prog@hotmail.com> - 2012-02-10 11:25 +1100
  Re: Get attribute from HTA Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-10 03:02 +0100
    Re: Get attribute from HTA Andrew Poulos <ap_prog@hotmail.com> - 2012-02-10 18:51 +1100
      Re: Get attribute from HTA Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-10 10:40 +0100
  Re: Get attribute from HTA Dr J R Stockton <reply1206@merlyn.demon.co.uk> - 2012-02-11 23:33 +0000

csiph-web