> thanks for all your replies, i was just wondering josh.. i was interested 
> in what you said about the ajax call, is this
> something simple to do... if so could you provide a short example of the 
> ajax call?

Sure, I use jQuery and it looks like this - keep in mind I have already 
cfparam'd session.jsenabled = false, and included the jQuery source file 
before this.  I think the other people who posted might have better 
solutions for your particular implementation, but this is a good technique 
to know about nonetheless.

<cfif not session.jsenabled>
<cfoutput>
<script type="text/javascript">
     $(document).ready(function() {
        $.get('shop/includes/setjsenabled.cfm'); // this is the ajax call
   });
</cfoutput>
</script>
</cfif>

Then setjsenabled.cfm is one line:
<cfset session.jsenabled = true>

onSessionEnd then logs the value of session.jsenabled into a db table when 
the session ends.  This way we can easily see what percentage of our 
visitors have js enabled, because session.jsenabled will never be set to 
true if the user does not have JS enabled.

-- Josh

----- Original Message ----- 
From: "Richard White" <[EMAIL PROTECTED]>
To: "CF-Talk" <cf-talk@houseoffusion.com>
Sent: Saturday, November 10, 2007 4:19 PM
Subject: Re: Javascript enabled


> Hi Casey... Wow, what a simple but very clever solution. very impressed. 
> thanks :)
>
> thanks for all your replies, i was just wondering josh.. i was interested 
> in what you said about the ajax call, is this something simple to do... if 
> so could you provide a short example of the ajax call?
>
> thanks again :)
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293083
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to