I don't speak JavaScript, so be easy on me.  But would something like the 
following work in Application.cfm?  Rather than the self.location part, I 
would rather set a thread-safe JS variable for checking the second time the 
app is accessed.  Any suggestions?

best,  paul

<CFIF NOT IsDefined("Client.JavaScriptOn")>
         <CFSET Client.JavaScriptOn = "No">
         <cfoutput>
         <script language="JavaScript">
         <!--
         self.location = "#CGI.Script_Name#?JavaScriptEnabled=Yes"
         // -->
         </script>
         </cfoutput>
<CFELSE>
         <CFIF IsDefined("URL.JavaScriptEnabled")>
                 <CFSET Client.JavaScriptOn = "Yes">
         </CFIF>
</CFIF>


At 01:59 AM 1/19/01 -0700, you wrote:
>You could do it with "dueling refreshes", as follows...
>
>Setop your first page with:
>
>    <cfsetting EnableCFOutputOnly="yes">
>    <cfif IsDefined("JavaScriptEnabled")>
>      <cfoutput>
>      <br>JavaScript=#JavaScriptEnabled#
>      </cfoutput>
>    <cfelse>
>      <cfoutput>
>      <h2>Loading...</h2>
>      <noscript>
>        <meta http-equiv="refresh"
>           content="0;URL=#CGI.Script_Name#?JavaScriptEnabled=No">
>      </noscript>
>
>      <script language="JavaScript">
>      <!--
>        self.location = "#CGI.Script_Name#?JavaScriptEnabled=Yes"
>      // -->
>      </script>
>      </cfoutput>
>    </cfif>
>    <cfsetting EnableCFOutputOnly="no">
>
>HTH
>
>Dick
>
>
>
>At 10:40 AM -0600 1/18/01, sebastian palmigiani wrote:
> >on 1/18/01 8:54 AM, Aaron Johnson at [EMAIL PROTECTED] wrote:
> >
> >>  Your assumption is that 98% of all users have scripting enabled.
> >>  Reality, as always is different.  I'd guess much lower, especially
> >>  taking into consideration all the viruses and IE bugs over the last
> >>  year where users, especially at corporations and ESPECIALLY in the
> >>  government have been required to turn JS off.
> >
> >
> >Is there a way to test if JS is turned off in application.cfm and then
> >output an error message saying "Hey turn JS on for this site or you can't go
> >further?' This would help.
> >
> >Anybody got any suggestions on how to approach this?
> >
> >Sebastian
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to