A proxy CFC is a good solution in this case, if it hasn't already been mentioned. What we've done in some cases is to write out primary CFC and place it outside the webroot. Then we write a proxy CFC, located in the web root, that extends the outer one. We define database vars (dsn, username, password, etc) there in the VARIABLES scope.
andy -----Original Message----- From: Rick Faircloth [mailto:[email protected]] Sent: Wednesday, September 09, 2009 2:51 PM To: cf-talk Subject: RE: How to handle CF variables in JS (jQuery) external files... Thanks, Tony... -----Original Message----- From: Tony Bentley [mailto:[email protected]] Sent: Wednesday, September 09, 2009 3:28 PM To: cf-talk Subject: Re: How to handle CF variables in JS (jQuery) external files... >Is there a way to hide the datasource name in the source code? > >As I look through the js code in my calling page, the datasource name >is still visible in other code, as well. > >I don't see a way to prevent that from happening. > >What am I missing here? Unfortunately, you will need to handle the datasource on the server side. Generally any server interactions should be handled in your server side code, and client interactions should be handled in your client side code. (MVC approach here) If you are doing an ajax post and you want to pass your datasource, do it so the datasource is referenced behind the scenes. Either store your datasources in an array in memory and use a numeric reference or find some other method other than passing it on the client side in literal string. This way you are hiding your values but are still able to reference them in some manner on the client side. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326170 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

