Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

IE8: What's wrong with document.documentElement.clientWidth?

microsoft.public.internetexplorer.general






Speedup My PC
Reply
  #1 (permalink)  
Old 03-01-2010
Axel Dahmen
 

Posts: n/a
IE8: What's wrong with document.documentElement.clientWidth?
I've created a JavaScript checking for browser properties on load.

From David Flanagan's book "javascript: The Definitive Guide", 5th edition,
published by O'Reilly, page 276, I learned that IE6+ may be recognized from
an expression like the following:

if (document.documentElement && document.documentElement.clientWidth) {...}

But this expression sometimes yields false!

I don't know yet what exactly causes the "false" condition, but it always
happens when I start-up my machine and double-click a <!DOCTYPE ... HTML
page linking to the above JavaScript. Once reloaded this condition always
yields "true".

Anyone experienced this behaviour before? What would be a better conditional
expression than the one above? Explicitly checking for undefined? Or null?

TIA,
Axel Dahmen
www.axeldahmen.de

Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-01-2010
Axel Dahmen
 

Posts: n/a
Re: IE8: What's wrong with document.documentElement.clientWidth?
I've just made a test:

Apparently, at first start-up after machine boot,
document.documentElement.clientWidth==0.

Seems dangerous to me to use this property then...




---------------------------
"Axel Dahmen" <KeenToKnow@newsgroup.nospam> schrieb im Newsbeitrag
news:4779441E-F33B-4212-A393-45F9F5820EF6@microsoft.com...
> I've created a JavaScript checking for browser properties on load.
>
> From David Flanagan's book "javascript: The Definitive Guide", 5th
> edition, published by O'Reilly, page 276, I learned that IE6+ may be
> recognized from an expression like the following:
>
> if (document.documentElement && document.documentElement.clientWidth)
> {...}
>
> But this expression sometimes yields false!
>
> I don't know yet what exactly causes the "false" condition, but it always
> happens when I start-up my machine and double-click a <!DOCTYPE ... HTML
> page linking to the above JavaScript. Once reloaded this condition always
> yields "true".
>
> Anyone experienced this behaviour before? What would be a better
> conditional expression than the one above? Explicitly checking for
> undefined? Or null?
>
> TIA,
> Axel Dahmen
> www.axeldahmen.de


Reply With Quote
  #3 (permalink)  
Old 03-01-2010
PA Bear [MS MVP]
 

Posts: n/a
Re: IE8: What's wrong with document.documentElement.clientWidth?
Developer-specific resources include:

MSDN IE Development Forum (post such questions here instead)
http://social.msdn.microsoft.com/For...opment/threads

IE Developer Center
http://msdn.microsoft.com/en-us/ie/default.aspx

Learn IE8
http://msdn.microsoft.com/en-us/ie/aa740473.aspx

HTML and DHTML Overviews and Tutorials
http://msdn.microsoft.com/en-us/library/ms537623.aspx and

Cascading Style Sheets (CSS)
http://msdn2.microsoft.com/en-us/ie/aa740476.aspx

Expression Web SuperPreview for Internet Explorer (free, stand-alone visual
debugging tool for IE6, IE7, and IE8)
http://www.microsoft.com/downloads/d...b-dccff3fae677

Expression Web SuperPreview Release Notes
http://www.microsoft.com/expression/...easeNotes.aspx

Validators:
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/

--
~Robear Dyer (PA Bear)
MS MVP-IE, Mail, Security, Windows Client - since 2002

Axel Dahmen wrote:
> I've just made a test:
>
> Apparently, at first start-up after machine boot,
> document.documentElement.clientWidth==0.
>
> Seems dangerous to me to use this property then...
>
>
>
>
> ---------------------------
> "Axel Dahmen" <KeenToKnow@newsgroup.nospam> schrieb im Newsbeitrag
> news:4779441E-F33B-4212-A393-45F9F5820EF6@microsoft.com...
>> I've created a JavaScript checking for browser properties on load.
>>
>> From David Flanagan's book "javascript: The Definitive Guide", 5th
>> edition, published by O'Reilly, page 276, I learned that IE6+ may be
>> recognized from an expression like the following:
>>
>> if (document.documentElement && document.documentElement.clientWidth)
>> {...}
>>
>> But this expression sometimes yields false!
>>
>> I don't know yet what exactly causes the "false" condition, but it always
>> happens when I start-up my machine and double-click a <!DOCTYPE ... HTML
>> page linking to the above JavaScript. Once reloaded this condition always
>> yields "true".
>>
>> Anyone experienced this behaviour before? What would be a better
>> conditional expression than the one above? Explicitly checking for
>> undefined? Or null?
>>
>> TIA,
>> Axel Dahmen
>> www.axeldahmen.de


Reply With Quote
  #4 (permalink)  
Old 03-03-2010
Axel Dahmen
 

Posts: n/a
Re: IE8: What's wrong with document.documentElement.clientWidth?
Did you miss to send any personal response in addition to your signature?

Or haven't you read my complaint about something not working in IE8 although
should? My posting has actually been a bug report...

Thanks,
Axel Dahmen


--------------
"PA Bear [MS MVP]" <PABearMVP@gmail.com> schrieb im Newsbeitrag
news:#0$MXTWuKHA.1852@TK2MSFTNGP05.phx.gbl...
> Developer-specific resources include:
>
> MSDN IE Development Forum (post such questions here instead)
> http://social.msdn.microsoft.com/For...opment/threads
>
> IE Developer Center
> http://msdn.microsoft.com/en-us/ie/default.aspx
>
> Learn IE8
> http://msdn.microsoft.com/en-us/ie/aa740473.aspx
>
> HTML and DHTML Overviews and Tutorials
> http://msdn.microsoft.com/en-us/library/ms537623.aspx and
>
> Cascading Style Sheets (CSS)
> http://msdn2.microsoft.com/en-us/ie/aa740476.aspx
>
> Expression Web SuperPreview for Internet Explorer (free, stand-alone
> visual debugging tool for IE6, IE7, and IE8)
> http://www.microsoft.com/downloads/d...b-dccff3fae677
>
> Expression Web SuperPreview Release Notes
> http://www.microsoft.com/expression/...aseNotes..aspx
>
> Validators:
> http://validator.w3.org/
> http://jigsaw.w3.org/css-validator/
>
> --
> ~Robear Dyer (PA Bear)
> MS MVP-IE, Mail, Security, Windows Client - since 2002
>
> Axel Dahmen wrote:
>> I've just made a test:
>>
>> Apparently, at first start-up after machine boot,
>> document.documentElement.clientWidth==0.
>>
>> Seems dangerous to me to use this property then...
>>
>>
>>
>>
>> ---------------------------
>> "Axel Dahmen" <KeenToKnow@newsgroup.nospam> schrieb im Newsbeitrag
>> news:4779441E-F33B-4212-A393-45F9F5820EF6@microsoft.com...
>>> I've created a JavaScript checking for browser properties on load.
>>>
>>> From David Flanagan's book "javascript: The Definitive Guide", 5th
>>> edition, published by O'Reilly, page 276, I learned that IE6+ may be
>>> recognized from an expression like the following:
>>>
>>> if (document.documentElement && document.documentElement.clientWidth)
>>> {...}
>>>
>>> But this expression sometimes yields false!
>>>
>>> I don't know yet what exactly causes the "false" condition, but it
>>> always
>>> happens when I start-up my machine and double-click a <!DOCTYPE ... HTML
>>> page linking to the above JavaScript. Once reloaded this condition
>>> always
>>> yields "true".
>>>
>>> Anyone experienced this behaviour before? What would be a better
>>> conditional expression than the one above? Explicitly checking for
>>> undefined? Or null?
>>>
>>> TIA,
>>> Axel Dahmen
>>> www.axeldahmen.de

>

Reply With Quote
  #5 (permalink)  
Old 03-03-2010
Dan
 

Posts: n/a
Re: IE8: What's wrong with document.documentElement.clientWidth?
PA Bear sent you a list of links to various IE developer resources.

This is just a newsgroup for users of IE to discuss things with other users,
not a bug reporting facility. MS dev don't monitor this group. Bugs should
normally be posted through the Microsoft Connect site at
http://connect.microsoft.com , although you'll find that the IE reporting
system was disabled when the beta ended. If you go to
https://connect.microsoft.com/IE then you'll see that under Other Feedback
Channels there is the IE Developer Forum - this is the first link that PA
Bear included in his reply, and is the only feedback resource listed by MS
for IE8.

Dan


"Axel Dahmen" <KeenToKnow@newsgroup.nospam> wrote in message
news:8010F3BB-9E7B-40BA-A804-3D40E07B0C86@microsoft.com...
> Did you miss to send any personal response in addition to your signature?
>
> Or haven't you read my complaint about something not working in IE8
> although should? My posting has actually been a bug report...
>
> Thanks,
> Axel Dahmen
>
>
> --------------
> "PA Bear [MS MVP]" <PABearMVP@gmail.com> schrieb im Newsbeitrag
> news:#0$MXTWuKHA.1852@TK2MSFTNGP05.phx.gbl...
>> Developer-specific resources include:
>>
>> MSDN IE Development Forum (post such questions here instead)
>> http://social.msdn.microsoft.com/For...opment/threads
>>
>> IE Developer Center
>> http://msdn.microsoft.com/en-us/ie/default.aspx
>>
>> Learn IE8
>> http://msdn.microsoft.com/en-us/ie/aa740473.aspx
>>
>> HTML and DHTML Overviews and Tutorials
>> http://msdn.microsoft.com/en-us/library/ms537623.aspx and
>>
>> Cascading Style Sheets (CSS)
>> http://msdn2.microsoft.com/en-us/ie/aa740476.aspx
>>
>> Expression Web SuperPreview for Internet Explorer (free, stand-alone
>> visual debugging tool for IE6, IE7, and IE8)
>> http://www.microsoft.com/downloads/d...b-dccff3fae677
>>
>> Expression Web SuperPreview Release Notes
>> http://www.microsoft.com/expression/...easeNotes.aspx
>>
>> Validators:
>> http://validator.w3.org/
>> http://jigsaw.w3.org/css-validator/
>>
>> --
>> ~Robear Dyer (PA Bear)
>> MS MVP-IE, Mail, Security, Windows Client - since 2002
>>
>> Axel Dahmen wrote:
>>> I've just made a test:
>>>
>>> Apparently, at first start-up after machine boot,
>>> document.documentElement.clientWidth==0.
>>>
>>> Seems dangerous to me to use this property then...
>>>
>>>
>>>
>>>
>>> ---------------------------
>>> "Axel Dahmen" <KeenToKnow@newsgroup.nospam> schrieb im Newsbeitrag
>>> news:4779441E-F33B-4212-A393-45F9F5820EF6@microsoft.com...
>>>> I've created a JavaScript checking for browser properties on load.
>>>>
>>>> From David Flanagan's book "javascript: The Definitive Guide", 5th
>>>> edition, published by O'Reilly, page 276, I learned that IE6+ may be
>>>> recognized from an expression like the following:
>>>>
>>>> if (document.documentElement && document.documentElement.clientWidth)
>>>> {...}
>>>>
>>>> But this expression sometimes yields false!
>>>>
>>>> I don't know yet what exactly causes the "false" condition, but it
>>>> always
>>>> happens when I start-up my machine and double-click a <!DOCTYPE ...
>>>> HTML
>>>> page linking to the above JavaScript. Once reloaded this condition
>>>> always
>>>> yields "true".
>>>>
>>>> Anyone experienced this behaviour before? What would be a better
>>>> conditional expression than the one above? Explicitly checking for
>>>> undefined? Or null?
>>>>
>>>> TIA,
>>>> Axel Dahmen
>>>> www.axeldahmen.de

>>





Reply With Quote
  #6 (permalink)  
Old 03-03-2010
Axel Dahmen
 

Posts: n/a
Re: IE8: What's wrong with document.documentElement.clientWidth?
Hi, Dan,

thanks for replying.

I followed a Hyperlink from the Microsoft site telling differently:


http://www.microsoft.com/windows/int...t/call-us.aspx

"Other support options
Leave feedback
If you have any feedback about Internet Explorer 8, please post it to
our newsgroup. "


For me this seemed the only way to get in touch with the IE development
team. The IE8 Connect channel has been closed down and there is no new IE9
Channel available at this time.

I'll try to follow the forum link, however, now. I had the impression so far
this forum was for plug-in developers only.

Thanks, Dan & PA for enlightening me!

Yours,
Axel Dahmen




-------------------
"Dan" <news@worldofspack.com> schrieb im Newsbeitrag
news:ACCF93C7-9204-4D69-B03E-4AF424403169@microsoft.com...
> PA Bear sent you a list of links to various IE developer resources.
>
> This is just a newsgroup for users of IE to discuss things with other
> users, not a bug reporting facility. MS dev don't monitor this group. Bugs
> should normally be posted through the Microsoft Connect site at
> http://connect.microsoft.com , although you'll find that the IE reporting
> system was disabled when the beta ended. If you go to
> https://connect.microsoft.com/IE then you'll see that under Other
> Feedback Channels there is the IE Developer Forum - this is the first link
> that PA Bear included in his reply, and is the only feedback resource
> listed by MS for IE8.
>
> Dan
>
>
> "Axel Dahmen" <KeenToKnow@newsgroup.nospam> wrote in message
> news:8010F3BB-9E7B-40BA-A804-3D40E07B0C86@microsoft.com...
>> Did you miss to send any personal response in addition to your signature?
>>
>> Or haven't you read my complaint about something not working in IE8
>> although should? My posting has actually been a bug report...
>>
>> Thanks,
>> Axel Dahmen
>>
>>
>> --------------
>> "PA Bear [MS MVP]" <PABearMVP@gmail.com> schrieb im Newsbeitrag
>> news:#0$MXTWuKHA.1852@TK2MSFTNGP05.phx.gbl...
>>> Developer-specific resources include:
>>>
>>> MSDN IE Development Forum (post such questions here instead)
>>> http://social.msdn.microsoft.com/For...opment/threads
>>>
>>> IE Developer Center
>>> http://msdn.microsoft.com/en-us/ie/default.aspx
>>>
>>> Learn IE8
>>> http://msdn.microsoft.com/en-us/ie/aa740473.aspx
>>>
>>> HTML and DHTML Overviews and Tutorials
>>> http://msdn.microsoft.com/en-us/library/ms537623.aspx and
>>>
>>> Cascading Style Sheets (CSS)
>>> http://msdn2.microsoft.com/en-us/ie/aa740476.aspx
>>>
>>> Expression Web SuperPreview for Internet Explorer (free, stand-alone
>>> visual debugging tool for IE6, IE7, and IE8)
>>> http://www.microsoft.com/downloads/d...b-dccff3fae677
>>>
>>> Expression Web SuperPreview Release Notes
>>> http://www.microsoft.com/expression/...aseNotes..aspx
>>>
>>> Validators:
>>> http://validator.w3.org/
>>> http://jigsaw.w3.org/css-validator/
>>>
>>> --
>>> ~Robear Dyer (PA Bear)
>>> MS MVP-IE, Mail, Security, Windows Client - since 2002
>>>
>>> Axel Dahmen wrote:
>>>> I've just made a test:
>>>>
>>>> Apparently, at first start-up after machine boot,
>>>> document.documentElement.clientWidth==0.
>>>>
>>>> Seems dangerous to me to use this property then...
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------
>>>> "Axel Dahmen" <KeenToKnow@newsgroup.nospam> schrieb im Newsbeitrag
>>>> news:4779441E-F33B-4212-A393-45F9F5820EF6@microsoft.com...
>>>>> I've created a JavaScript checking for browser properties on load.
>>>>>
>>>>> From David Flanagan's book "javascript: The Definitive Guide", 5th
>>>>> edition, published by O'Reilly, page 276, I learned that IE6+ may be
>>>>> recognized from an expression like the following:
>>>>>
>>>>> if (document.documentElement && document.documentElement.clientWidth)
>>>>> {...}
>>>>>
>>>>> But this expression sometimes yields false!
>>>>>
>>>>> I don't know yet what exactly causes the "false" condition, but it
>>>>> always
>>>>> happens when I start-up my machine and double-click a <!DOCTYPE ....
>>>>> HTML
>>>>> page linking to the above JavaScript. Once reloaded this condition
>>>>> always
>>>>> yields "true".
>>>>>
>>>>> Anyone experienced this behaviour before? What would be a better
>>>>> conditional expression than the one above? Explicitly checking for
>>>>> undefined? Or null?
>>>>>
>>>>> TIA,
>>>>> Axel Dahmen
>>>>> www.axeldahmen.de
>>>

>
>
>
>

Reply With Quote
  #7 (permalink)  
Old 03-03-2010
PA Bear [MS MVP]
 

Posts: n/a
Re: IE8: What's wrong with document.documentElement.clientWidth?
Post about such issues here instead:
http://social.msdn.microsoft.com/For...opment/threads

No one here works for or represents Microsoft (including me).


Axel Dahmen wrote:
> Did you miss to send any personal response in addition to your signature?
>
> Or haven't you read my complaint about something not working in IE8
> although
> should? My posting has actually been a bug report...
>
> Thanks,
> Axel Dahmen
>
>
> --------------
> "PA Bear [MS MVP]" <PABearMVP@gmail.com> schrieb im Newsbeitrag
> news:#0$MXTWuKHA.1852@TK2MSFTNGP05.phx.gbl...
>> Developer-specific resources include:
>>
>> MSDN IE Development Forum (post such questions here instead)
>> http://social.msdn.microsoft.com/For...opment/threads
>>
>> IE Developer Center
>> http://msdn.microsoft.com/en-us/ie/default.aspx
>>
>> Learn IE8
>> http://msdn.microsoft.com/en-us/ie/aa740473.aspx
>>
>> HTML and DHTML Overviews and Tutorials
>> http://msdn.microsoft.com/en-us/library/ms537623.aspx and
>>
>> Cascading Style Sheets (CSS)
>> http://msdn2.microsoft.com/en-us/ie/aa740476.aspx
>>
>> Expression Web SuperPreview for Internet Explorer (free, stand-alone
>> visual debugging tool for IE6, IE7, and IE8)
>> http://www.microsoft.com/downloads/d...b-dccff3fae677
>>
>> Expression Web SuperPreview Release Notes
>> http://www.microsoft.com/expression/...easeNotes.aspx
>>
>> Validators:
>> http://validator.w3.org/
>> http://jigsaw.w3.org/css-validator/
>>
>> --
>> ~Robear Dyer (PA Bear)
>> MS MVP-IE, Mail, Security, Windows Client - since 2002
>>
>> Axel Dahmen wrote:
>>> I've just made a test:
>>>
>>> Apparently, at first start-up after machine boot,
>>> document.documentElement.clientWidth==0.
>>>
>>> Seems dangerous to me to use this property then...
>>>
>>>
>>>
>>>
>>> ---------------------------
>>> "Axel Dahmen" <KeenToKnow@newsgroup.nospam> schrieb im Newsbeitrag
>>> news:4779441E-F33B-4212-A393-45F9F5820EF6@microsoft.com...
>>>> I've created a JavaScript checking for browser properties on load.
>>>>
>>>> From David Flanagan's book "javascript: The Definitive Guide", 5th
>>>> edition, published by O'Reilly, page 276, I learned that IE6+ may be
>>>> recognized from an expression like the following:
>>>>
>>>> if (document.documentElement && document.documentElement.clientWidth)
>>>> {...}
>>>>
>>>> But this expression sometimes yields false!
>>>>
>>>> I don't know yet what exactly causes the "false" condition, but it
>>>> always
>>>> happens when I start-up my machine and double-click a <!DOCTYPE ...
>>>> HTML
>>>> page linking to the above JavaScript. Once reloaded this condition
>>>> always
>>>> yields "true".
>>>>
>>>> Anyone experienced this behaviour before? What would be a better
>>>> conditional expression than the one above? Explicitly checking for
>>>> undefined? Or null?
>>>>
>>>> TIA,
>>>> Axel Dahmen
>>>> www.axeldahmen.de


Reply With Quote
  #8 (permalink)  
Old 03-04-2010
Dan
 

Posts: n/a
Re: IE8: What's wrong with document.documentElement.clientWidth?

"Axel Dahmen" <KeenToKnow@newsgroup.nospam> wrote in message
news:A5A60FEA-0BF9-4F5C-A98B-10CB5BF7FAA7@microsoft.com...
> Hi, Dan,
>
> thanks for replying.
>
> I followed a Hyperlink from the Microsoft site telling differently:
>
>
> http://www.microsoft.com/windows/int...t/call-us.aspx
>
> "Other support options
> Leave feedback
> If you have any feedback about Internet Explorer 8, please post it
> to our newsgroup. "


Ah, that old misdirection from Microsoft. It's caught a lot of people out.

> For me this seemed the only way to get in touch with the IE development
> team. The IE8 Connect channel has been closed down and there is no new IE9
> Channel available at this time.


As I said, nobody from MS appears to monitor this group. All the public MS
newsgroups are peer-to-peer discussion, nothing more.

> I'll try to follow the forum link, however, now. I had the impression so
> far this forum was for plug-in developers only.
>
>
> Thanks, Dan & PA for enlightening me!
>
> Yours,
> Axel Dahmen



Good luck

Dan

>
>
>
> -------------------
> "Dan" <news@worldofspack.com> schrieb im Newsbeitrag
> news:ACCF93C7-9204-4D69-B03E-4AF424403169@microsoft.com...
>> PA Bear sent you a list of links to various IE developer resources.
>>
>> This is just a newsgroup for users of IE to discuss things with other
>> users, not a bug reporting facility. MS dev don't monitor this group.
>> Bugs should normally be posted through the Microsoft Connect site at
>> http://connect.microsoft.com , although you'll find that the IE reporting
>> system was disabled when the beta ended. If you go to
>> https://connect.microsoft.com/IE then you'll see that under Other
>> Feedback Channels there is the IE Developer Forum - this is the first
>> link that PA Bear included in his reply, and is the only feedback
>> resource listed by MS for IE8.
>>
>> Dan
>>
>>
>> "Axel Dahmen" <KeenToKnow@newsgroup.nospam> wrote in message
>> news:8010F3BB-9E7B-40BA-A804-3D40E07B0C86@microsoft.com...
>>> Did you miss to send any personal response in addition to your
>>> signature?
>>>
>>> Or haven't you read my complaint about something not working in IE8
>>> although should? My posting has actually been a bug report...
>>>
>>> Thanks,
>>> Axel Dahmen
>>>
>>>
>>> --------------
>>> "PA Bear [MS MVP]" <PABearMVP@gmail.com> schrieb im Newsbeitrag
>>> news:#0$MXTWuKHA.1852@TK2MSFTNGP05.phx.gbl...
>>>> Developer-specific resources include:
>>>>
>>>> MSDN IE Development Forum (post such questions here instead)
>>>> http://social.msdn.microsoft.com/For...opment/threads
>>>>
>>>> IE Developer Center
>>>> http://msdn.microsoft.com/en-us/ie/default.aspx
>>>>
>>>> Learn IE8
>>>> http://msdn.microsoft.com/en-us/ie/aa740473.aspx
>>>>
>>>> HTML and DHTML Overviews and Tutorials
>>>> http://msdn.microsoft.com/en-us/library/ms537623.aspx and
>>>>
>>>> Cascading Style Sheets (CSS)
>>>> http://msdn2.microsoft.com/en-us/ie/aa740476.aspx
>>>>
>>>> Expression Web SuperPreview for Internet Explorer (free, stand-alone
>>>> visual debugging tool for IE6, IE7, and IE8)
>>>> http://www.microsoft.com/downloads/d...b-dccff3fae677
>>>>
>>>> Expression Web SuperPreview Release Notes
>>>> http://www.microsoft.com/expression/...easeNotes.aspx
>>>>
>>>> Validators:
>>>> http://validator.w3.org/
>>>> http://jigsaw.w3.org/css-validator/
>>>>
>>>> --
>>>> ~Robear Dyer (PA Bear)
>>>> MS MVP-IE, Mail, Security, Windows Client - since 2002
>>>>
>>>> Axel Dahmen wrote:
>>>>> I've just made a test:
>>>>>
>>>>> Apparently, at first start-up after machine boot,
>>>>> document.documentElement.clientWidth==0.
>>>>>
>>>>> Seems dangerous to me to use this property then...
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------
>>>>> "Axel Dahmen" <KeenToKnow@newsgroup.nospam> schrieb im Newsbeitrag
>>>>> news:4779441E-F33B-4212-A393-45F9F5820EF6@microsoft.com...
>>>>>> I've created a JavaScript checking for browser properties on load.
>>>>>>
>>>>>> From David Flanagan's book "javascript: The Definitive Guide", 5th
>>>>>> edition, published by O'Reilly, page 276, I learned that IE6+ may be
>>>>>> recognized from an expression like the following:
>>>>>>
>>>>>> if (document.documentElement && document.documentElement.clientWidth)
>>>>>> {...}
>>>>>>
>>>>>> But this expression sometimes yields false!
>>>>>>
>>>>>> I don't know yet what exactly causes the "false" condition, but it
>>>>>> always
>>>>>> happens when I start-up my machine and double-click a <!DOCTYPE ...
>>>>>> HTML
>>>>>> page linking to the above JavaScript. Once reloaded this condition
>>>>>> always
>>>>>> yields "true".
>>>>>>
>>>>>> Anyone experienced this behaviour before? What would be a better
>>>>>> conditional expression than the one above? Explicitly checking for
>>>>>> undefined? Or null?
>>>>>>
>>>>>> TIA,
>>>>>> Axel Dahmen
>>>>>> www.axeldahmen.de
>>>>

>>
>>
>>
>>




Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ATTN: Ringmaster Albright, what is wrong with you? Really, Ringmasterwhat went wrong? Junk Yard Dog microsoft.public.windows.vista.general 2 08-17-2008 00:32
accidentally moved a MS Word document,now it dissapears everytime i open any word document tim microsoft.public.windows.vista.performance maintenance 1 09-28-2007 11:40
accidentally moved a MS Word document,now it dissapears everytime i open any word document tim microsoft.public.windows.vista.general 2 09-14-2007 18:44
View and copy document content without opening the document hash microsoft.public.windows.vista.general 4 07-27-2007 23:55
View and copy document content without opening the document hash microsoft.public.windows.vista.performance maintenance 3 07-23-2007 16:43




All times are GMT +1. The time now is 03:26.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120