> Ok let me setup what I am trying to do here:
> 
> I have been testing/playing with this and almost have it, but 
> yet I am a million miles away too.
> 
> If I do:
> <script language="JavaScript" src="library/validatesearch.js">
> </script> like normal all works fine.
> 
> I can rename the .js file to .txt and then make the page call 
> like so:
> <script language="JavaScript" src="library/validatesearch.txt">
> </script> and this also works.
> 
> Now say that I rename the .js file to .cfm and do it like so
> <script language="JavaScript" src="library/validatesearch.cfm">
> </script> then in the .js file which is now a CFM template I had 
> the following CFHeader, but it throws JS errors.
> 
> <cfheader name="Content-Disposition" value="text/javascript">
> 
> I think that I am on the right track here, but it's just a 
> matter of getting the content types setup right, anybody got any 
> ideas, am I on the right track, should I be using CFCONTENT?

You don't want to set the Content-Disposition header, which tells the
browser how to dispose of the file (save it to the filesystem, etc) but
rather the Content-Type header, which you can set with CFCONTENT. You might
use "text/javascript" or "application/x-javascript" for the content type -
I've seen both used. You can also set the TYPE attribute in your SCRIPT tag
to "text/javascript".

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to