Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #17374
| Message-ID | <1755366.uXxN3bmrn2@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2012-11-27 23:50 +0100 |
| Subject | Re: baffled trying to call style.display value |
| Newsgroups | comp.lang.javascript |
| References | <8b828e29-6604-45c7-9166-f17e5b39724d@googlegroups.com> <4620a8a4-7848-4ca7-941e-c826259acbac@googlegroups.com> <timstreater-AA2C37.17591527112012@news.individual.net> <3709927.HS29Ki5Fzn@PointedEars.de> <timstreater-0E0CDD.22320727112012@news.individual.net> |
| Followup-To | comp.lang.javascript |
Followups directed to: comp.lang.javascript
Tim Streater wrote:
> Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote:
>> Tim Streater wrote:
>> > JeffG <jeffgutsell@fuse.net> wrote:
>> >> This is incredibly helpful. I will make use of all your suggestions in
>> >> various aspects of my project - not just this function.
>> >
>> > I had to deduce empirically that elementPtr.style gave incomplete
>> > information, however I've yet to see any reason for that, good or bad.
>> > Getting the required style info can be done, but seems to involve some
>> > steps. For example:
>> >
>> > compPtr = document.getElementById (comp);
>> > stylePtr = document.defaultView.getComputedStyle (compPtr, null);
>> > height = parseInt (stylePtr.getPropertyValue ("height"));
>> ^
>> Wrong, see <news:1788183.LAg6v8g3if@PointedEars.de>. A fallback for
>> MSHTML < 9 is also missing.
>
> I have zero interest in *any* version of IE.
IOW, you are an incompetent fool.
>> It is usually better not to rely on the
>> computed style; certainly it is not necessary here.
>
> In the instance from which I drew the code it was not merely necessary,
> but vital.
That is what "usually" means. This one is not one rare of the occasions
where using the computed style is either necessary or vital, because the
approach that leads to the necessity here is wrong.
>> It is also considered good style to let argument lists – by contrast to
>> operands – be _not_ delimited by whitespace from the method property
>> access:
>>
>> var height = parseInt(stylePtr.getPropertyValue("height"), 10);
>
> Your views on what constitutes good style are a matter of complete
> indifference to me.
Those are not merely my views.
> As usual you jump in with both feet and make a fool of yourself. Now go
> away - again.
You are talking to the mirror again.
PointedEars
--
Sometimes, what you learn is wrong. If those wrong ideas are close to the
root of the knowledge tree you build on a particular subject, pruning the
bad branches can sometimes cause the whole tree to collapse.
-- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
baffled trying to call style.display value JeffG <jeffgutsell@fuse.net> - 2012-11-27 08:08 -0800
Re: baffled trying to call style.display value Scott Sauyet <scott.sauyet@gmail.com> - 2012-11-27 08:20 -0800
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-10 01:24 +0100
Re: baffled trying to call style.display value Scott Sauyet <scott.sauyet@gmail.com> - 2012-12-10 05:03 -0800
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-10 16:04 +0100
Re: baffled trying to call style.display value Scott Sauyet <scott.sauyet@gmail.com> - 2012-12-10 08:54 -0800
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-10 19:36 +0100
Re: baffled trying to call style.display value Stefan Weiss <krewecherl@gmail.com> - 2012-12-10 22:45 +0100
Re: baffled trying to call style.display value Andrew Poulos <ap_prog@hotmail.com> - 2012-12-11 10:19 +1100
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-11 00:34 +0100
Re: baffled trying to call style.display value Scott Sauyet <scott.sauyet@gmail.com> - 2012-12-10 07:39 -0800
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-10 17:10 +0100
Re: baffled trying to call style.display value Jake Jarvis <pig_in_shoes@yahoo.com> - 2012-11-27 17:33 +0100
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-27 17:49 +0100
Re: baffled trying to call style.display value JeffG <jeffgutsell@fuse.net> - 2012-11-27 09:38 -0800
Re: baffled trying to call style.display value Tim Streater <timstreater@greenbee.net> - 2012-11-27 17:59 +0000
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-27 21:01 +0100
Re: baffled trying to call style.display value Tim Streater <timstreater@greenbee.net> - 2012-11-27 22:32 +0000
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-27 23:50 +0100
csiph-web