Yes, and no.  CF is server-side; it's interaction with the browser consists
of just HTTP POST and GET, which has nothing to do with JS.  However, you
can have the browser tell CF if JS is enabled.

in your application.cfm:
<cfparam name="session.hasJS" default="no">

in your first page on your site:
<script>
document.write("<img src=\"js.cfm\">");
</script>

in js.cfm:
<cfcontent type="image/gif" file="c:\trans.gif" deletefile="No">
<cfset session.hasJS = "yes">


(I omitted CFLOCK for brevity - always CFLOCK session vars)

In the first page in the session, session.hasJS will be no - but afterwards,
it will be yes if they have it turned on.

---
Billy Cravens


----- Original Message -----
From: "Tangorre, Michael T." <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, December 14, 2001 10:56 AM
Subject: CF and JS


> Is there anyway to detect if a browser has javascript enabled/disabled
using
> CF?
>
> Michael T. Tangorre
>
> ============================
> Resident Assistant - Brick
> Web Applications Developer
> A.U. Webteam Slave  :-)
> AIM: CrazyFlash4
> ============================
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to