[jQuery] Coldfusion: using $.get() to directly call a CFC living outside of the webroot

[jQuery] Coldfusion: using $.get() to directly call a CFC living outside of the webroot

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=035581118-05042007><FONT face=Arial size=2>Right now m JS looks
like this:</FONT></SPAN></DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial size=2>$.get("psychic.cfm",
{method:idArr[0],key:idArr[1]}, function(data){<BR>    //do some
stuff</FONT></SPAN></DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial
size=2>});</FONT></SPAN></DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial size=2>psychic.cfm contains
the following code:</FONT></SPAN></DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial size=2><cfset
VARIABLES.ps = CreateObject("component","includes.salesman")><BR><cfparam
name="URL.method" default=""><BR><cfparam name="URL.key"
default=""><BR><cfset func =
VARIABLES.ps[URL.method]><BR><cfoutput>#func(URL.key)#</cfoutput></FONT></SPAN></DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial size=2>It's the only way
that I can think of to call a CFC outside of my webroot. I don't like having to
do this as it requires a middle-man page. The upside is that it works
flawlessly.</FONT></SPAN></DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial size=2>I do have a mapping
to the CFC directory (not the one above):</FONT></SPAN></DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial
size=2>apps.cfcs.theCFCinQuestion</FONT></SPAN></DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=035581118-05042007><FONT face=Arial size=2>Is there any way to
call against that CFC directly instead of having to use a middle
page?</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><SPAN style="FONT-SIZE: 14px"><B><FONT face="Century Gothic">
<DIV align=left><SPAN class=159130414-05012007><FONT face=Arial size=2><SPAN
class=159130414-05012007><FONT face=Arial
size=2>____________________________________</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=159130414-05012007><FONT face=Arial size=2><SPAN
class=159130414-05012007></SPAN></FONT></SPAN> </DIV>Andy
Matthews<BR></FONT></B></SPAN><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic"><SPAN
style="FONT-SIZE: 8.5pt; FONT-FAMILY: 'Century Gothic'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-no-proof: yes">Senior
Coldfusion Developer</SPAN><BR></FONT></SPAN><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic"><FONT color=#808080><IMG alt="" hspace=0
src="cid:035581118@05042007-3113" border=0><BR></FONT>Office:  877.707.5467
x747<BR>Direct:  615.627.9747<BR>Fax:
 615.467.6249</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic">amatthews@dealerskins.com<BR><A
href="http://www.dealerskins.com/">www.dealerskins.com</A></FONT></SPAN></DIV>
<DIV> </DIV></BODY></HTML>