Eureka !

Just as I was about to open up the farcry core, I had a hunch about
IIS and it paid off :)

I merely set a virtual directory mapping to CFIDE within IIS and it
all works perfectly!

Thanks for your responses, jeff and marco, much appreciated for your
time and efforts.

On Nov 19, 5:57 pm, BazD <[EMAIL PROTECTED]> wrote:
> Hi Jeff
>
> The cfc is located in the webroot, as is the cfm page that calls it.
> Its just strange how I can invoke the cfc, which proves the path to
> the cfc is ok as is, just not use cfajaxproxy, hmmmm. I need to delve
> deeper into the farcry code and see what lurks inside. Its the first
> time Ive used cfajaxproxy so Im not particular clued up on the
> possibility of farcry code somewhere upsetting things.
>
> On Nov 19, 5:15 pm, Jeff Coughlin <[EMAIL PROTECTED]> wrote:
>
> > Ahh cfajaxproxy, one of my favorite tags in CF8. Off the top of my  
> > head, I think you have to tell the tag the full path to the CFC file,  
> > no? (wish I had a code sample in front of me to verify, but I'm on my  
> > phone at the moment).
>
> > So if your CFC file resided in www\facade\proxy.cfc, then you'd have  
> > something like <cfajaxproxy cfc="facade.proxy" jsclassname="proxy">
>
> > Otherwise, the way you're calling the tag, CF is assuming that your  
> > CFC is in the webroot.
>
> > Hopefully I'm not completely wrong :) (It's morning and I haven't had  
> > my coffee yet).
>
> > Jeff Coughlin
>
> > Sent from my iPhone
>
> > On Nov 19, 2008, at 8:50, BazD <[EMAIL PROTECTED]> wrote:
>
> > > Thanks Marco
>
> > > After some extensive googling, I found this very useful guide on using
> > > cfajaxproxy, which apparently, is a built-in tag in coldfusion 8:
>
> > >http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tag...
>
> > > Ive created a very simple test page, which works fine outside of my
> > > local farcry folder, but as soon as I move the .cfm and .cfc files to
> > > within the farcry www folder, it says that the coldfusion component
> > > name that I am trying to call is undefined.
>
> > > The .cfm page is like this:
>
> > > <cfajaxproxy cfc="proxy" jsclassname="proxy" />
>
> > > <script>
> > >    function serverTimeClick() {
> > >        var instance = new proxy();
> > >        instance.setCallbackHandler(serverTimeSuccess);
> > >        instance.serverTime();
> > >    }
>
> > >    function serverTimeSuccess(result) {
> > >        document.getElementById('output').innerHTML = result;
> > >    }
> > > </script>
> > > <button name="serverTime" onClick="serverTimeClick()">Server Time</
> > > button>
> > > <br><br>
> > > <div id="output"></div>
>
> > > and the .cfc page is like this:
>
> > > <cfcomponent>
> > > <cffunction name="serverTime" access="remote" returntype="string">
> > >        <cfset var local = {} />
>
> > >        <cfset local.time = now() />
> > >        <cfset local.result = dateFormat(local.time, "dd mmm yyyy") &  
> > > " - "
> > > & timeFormat(local.time, "hh:mm:ss") />
>
> > >        <cfreturn local.result />
> > >    </cffunction>
>
> > > </cfcomponent>
>
> > > when I run the .cfm page, it throws the error, however, if I create
> > > another .cfm page which uses a regular invoke, it works fine:
>
> > > <cfinvoke component="proxy" method="serverTime"
> > > returnvariable="result">
> > > <cfoutput>#result#</cfoutput>
>
> > > Is there something within Farcry that could be conflicting with
> > > cfajaxproxy tag ?
>
> > > On Nov 19, 1:42 pm, Marco van den Oever <[EMAIL PROTECTED]>
> > > wrote:
> > >> Get some in a bucket, add water, and you're done! (here in the
> > >> Netherlands ajax is a substance to clean your house etc)
>
> > >> Ok sorry for that, i think you best have a look at:
>
> > >>http://www.google.nl/search?
> > >> q=cfajax&ie=utf-8&oe=utf-8&aq=t&rls=org.m...
>
> > >> On Nov 19, 2:36 pm, BazD <[EMAIL PROTECTED]> wrote:
>
> > >>> Thanks Sean.
>
> > >>> And my next question is, how does one use AJAX :)
>
> > >>> On Nov 19, 1:28 pm, Sean Coyne <[EMAIL PROTECTED]> wrote:
>
> > >>>> CF is server side.  Once the link gets to the browser its just  
> > >>>> HTML.
> > >>>> The browser cant execute ColdFusion.  Now, that said, you can do an
> > >>>> AJAX call to a CFC or a CFM page and return data.  This actually
> > >>>> generates another request to the CF server which returns HTML, XML,
> > >>>> JSON, etc to the browser.
>
> > >>>> Sean
>
> > >>>> On Nov 19, 8:21 am, BazD <[EMAIL PROTECTED]> wrote:
>
> > >>>>> Hi folks
>
> > >>>>> Does anyone know to trigger a coldfusion function from within <a
> > >>>>> href=""></a> ?
>
> > >>>>> What I have at the moment is a simple test script, but all this  
> > >>>>> does
> > >>>>> is display "hello" when the page has loaded and not when the  
> > >>>>> link has
> > >>>>> been clicked:
>
> > >>>>> <cfscript>
> > >>>>> function test() {
> > >>>>> writeOutput("hello");}
>
> > >>>>> writeOutput("<a href='##' onClick='#test()#'>click here</a>");
> > >>>>> </cfscript>
>
> > >>>>> What I want to create is a simple link on a page which triggers a
> > >>>>> coldfusion function. This all has to happen within the same page  
> > >>>>> as
> > >>>>> the client dosnt want to jump from page to page.
>
> > >>>>> Im new to coldfusion components and stuff, not sure if they are  
> > >>>>> they
> > >>>>> way to achieve the results I need.
>
> > >>>>> Any help much appreciated
>
> > >>>>> Thanks
> > >>>>> B
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to