The only question now is whether or not
HTTP_X_REQUESTED_WITH is compatible
with ColdFusion 4.5...

> the client side can easily *tell* that to the server side

It doesn't really matter how the server-side knows, as long as it knows :o)

And a question about adding it to a URL... how does the client-side page
determine whether JS is available or not before any code is executed?
What's
the means of determine wither to add .cfm?Ajax=False or .cfm?Ajax=True ?



-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott Sauyet
Sent: Friday, April 20, 2007 11:50 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Best way to determine if a user has Javascript
enabled?


Rick Faircloth wrote:
>> The simplest 
>> thing is just to add a post parameter that says "ajaxOn=true" or some 
>> such, then check for that server-side.  It wasn't included in the HTML, 
>> or it was set to false, so if it's true, the server knows to respond 
>> with an AJAX request.  It's pretty straightforward.
> 
> Well, then, wouldn't that amount to a fool-proof test that Ajax is
available
> for the server to use as a response mechanism?

Yes, that's what a number of people have been trying to tell you.  There 
is no useful way for the server side to determine if JS is on, but the 
client side can easily *tell* that to the server side.

> And I assume by "add a post parameter", you mean a hidden field in the
> form or somewhere in the JS code on the calling page with a variable?

Yes, although it could also be done through a parameter added to the 
query string or the URL, depending upon how you want to handle it server 
side.  But the other option, suggested on this thread, to use the HTTP 
header HTTP_X_REQUESTED_WITH  means no extra work in the JS, and is 
probably a better idea, as long as you are sure you will be using JQuery 
for a while.

Good luck,

   -- Scott




Reply via email to