Hi Phil,
> How about just doing something like:
>
> <noscript>
> <cfset js = "off">
> </noscript>
The problem with this is that your conditional code (noscript) is running client-side,
after the server has done it's work.. So it can't really tell the server anything..
You could do something like this, though:
<cfif NOT IsDefined("Session.JS")>
<!--- Call an empty single pixel gif. Gives the script below something to refer to.
--->
<img name="foo" src="/images/spacer.gif" width="1" height="1">
<!--- If browser supports JS, use JS to call the action template, setting the value
for JS to True. --->
<script language="Javascript">
document.images.foo.src = "setjs.cfm?js=true";
</script>
<!--- If browser doesn't support JS, call the action template with URL value for
false. --->
<noscript>
<img name="foo" src="setjs.cfm?js=false" width="1" height="1">
</noscript>
</cfif>
Then, "setjs.cfm" would look like this:
<cfparam name="url.js" default="false">
<!--- Set the Session Var --->
<cflock name="JS">
<cfset Session.JS = URL.js>
</cflock>
<!--- Send the image data --->
<cfcontent type="image/GIF" file="c:\inetpub\wwwroot\images\spacer.gif">
That code isn't tested, but the general principle should be sound.. Also, there's
probably a much easier way to detect JS browsers as well.. This is just something
that popped into my head.
Hope this helps (more than it confuses) ;),
Seth
------------------------------
Seth Bienek
Solutions Development Manager
Stonebridge Technologies, Inc.
972.455.7294 tel
972.404.9754 fax
ICQ #7673959
------------------------------
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org