Has anyone had any success using the method of hiding javascript detailed
below - i tried and it was fine if the js files had any extension other than
.cfm, but using .cfm just caused it to throw js errors.

Bert

> -----Original Message-----
> From: Dan Haley [mailto:[EMAIL PROTECTED]]
> Sent: 27 September 2000 22:42
> To: Fusebox
> Subject: RE: nothing about stocks or beer glasses - hiding javascript
> inst ead
> 
> 
<trim>
> Also, from the replies, it appears this works in a couple of 
> browsers, but
> is easily gone around by using a different browser.  That 
> said, here is the
> source and you are welcome to do what you will with it!
> 
> 
> ********** Here is the file that displays in the browser:
> <html><head>
> <cf_browser>
> <cfif browser["type"] eq "MSIE">
>       <script language="javascript" type="text/javascript"
> src="jsy/test2.cfm"></script>
> <cfelse>
>       <cfset session.canseejs = "true">
>       <script language="javascript" type="text/javascript"
> src="jsz/test2.cfm"></script>
> </cfif>
> </head>
> <body><a href="#" onclick="test(); return false;">click
> here</a></body></html>
> 
> *********** In the jsy directory for IE browsers, here is the
> application.cfm
> <cfif cgi.http_referer eq ""><cfabort></cfif>
> 
> *********** In the jsy directory for IE browsers, here is test2.cfm
> <!--- include meta tags for controlling caching - don't know 
> if there is any
> effect,
>               but it seemed to work --->
> <cfinclude template="/fusebox/headers.cfm">
> function test() {
> alert('<cfoutput>#cgi.http_referer#</cfoutput>');
> }
> 
> *********** In the jsz directory for NN browsers, here is test2.cfm
> <cfinclude template="/fusebox/headers.cfm">
> <cfcontent type="text/javascript">
> <cfif not isdefined("session.canseejs") or not
> session.canseejs><cfabort></cfif>
> function test() {
> alert('<cfoutput>#cgi.script_name#</cfoutput>');
> alert('<cfoutput>#session.canseejs#</cfoutput>');
> }
> <cfset session.canseejs = "false">
> 
> 
> -----Original Message-----
> From: David Burt [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 27, 2000 9:06 AM
> To: Fusebox
> Subject: RE: nothing about stocks or beer glasses - hiding javascript
> ins tead
> 
> 
> what does the source of those two files look like?
> 
> --------------------------------------------------------------
> ----------------
> To Unsubscribe visit 
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
s/fusebox or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to