If the user has JS turned off, you're JS will not fire, and you won't
find anything out about their browser.  Am I missing something?

> -----Original Message-----
> From: Jim Davis [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 29, 2005 10:17 AM
> To: CF-Talk
> Subject: RE: Know with cf if Javascript is enabled?
> 
> I've an example of a technique here:
> 
> http://www.depressedpress.com/Content/Development/ColdFusion/A
> rticles/GetRes
> /Index.cfm
> 
> That code is really old however.
> 
> The version I'm actually using is wrapped as a custom tag and 
> determines JS
> version (and whether or not it's enabled) as well.  I'll attach the
> JavaScript of it below.
> 
> Jim Davis
> 
> 
> <script language="Javascript" type="text/javascript">var JSVersion =
> 1.0</script>
> <script language="Javascript1.1" type="text/javascript">JSVersion =
> 1.1</script>
> <script language="Javascript1.2" type="text/javascript">JSVersion =
> 1.2</script>
> <script language="Javascript1.3" type="text/javascript">JSVersion =
> 1.3</script>
> <script language="Javascript1.4" type="text/javascript">JSVersion =
> 1.4</script>
> <script language="Javascript1.5" type="text/javascript">JSVersion =
> 1.5</script>
> <script language="Javascript" type="text/javascript"><!--
> 
>               // Default all Values to Zero
>       ColorDepth = 0;
>       ResHeight = 0;
>       ResWidth = 0;
>       ResAvailHeight = 0;
>       ResAvailWidth = 0;
>       ResBrowserHeight = 0;
>       ResBrowserWidth = 0;
>               // Get the basic values 
>       if (JSVersion > 1.1) {
>               ColorDepth = screen.colorDepth;
>               ResHeight = screen.height;
>               ResWidth = screen.width;
>               ResAvailHeight = screen.availHeight;
>               ResAvailWidth = screen.availWidth;
>       };
>               // Try to get the Browser Window info
>               // If the innerwidth property is set then try 
> to use that -
> supported by Netscape and several other browsers
>       if( typeof( window.innerWidth ) == 'number' ) {
>               ResBrowserWidth = window.innerWidth;
>               ResBrowserHeight = window.innerHeight;
>               // The following is only supported by IE 6 in 
> some cases.
>       } else if( ( typeof( document.documentElement.clientWidth ) ==
> 'number' ) && ( document.documentElement.clientWidth > 0 ) ) {
>               ResBrowserWidth = document.documentElement.clientWidth;
>               ResBrowserHeight = 
> document.documentElement.clientHeight;
>               // Finally test if we're IE and use the IE 
> specific values
>       } else if( document.body && ( document.body.clientWidth ||
> document.body.clientHeight ) ) {
>               ResBrowserWidth = document.body.clientWidth;
>               ResBrowserHeight = document.body.clientHeight;
>       };
>               // Create the call to the image
>       document.write("<img src='FauxGIF.cfm?ScreenData=JS" + 
> JSVersion +
> "," + ColorDepth + "," + ResHeight + "," + ResWidth + "," + 
> ResAvailHeight +
> "," + ResAvailWidth + "," + ResBrowserHeight + "," + 
> ResBrowserWidth + "'
> width='1' height='1' alt='' border='0'>");
> 
>       //-->
> </script>
> <noscript><img name="HeartBeat"
> src="FauxGIF.cfm?ScreenData=NoJS,0,0,0,0,0,0,0" width="1" 
> height="1" alt=""
> border="0"></noscript>

This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. A1.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225575
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to