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:326166
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to