1 Replies - 2940 Views - Last Post: 13 February 2013 - 04:17 PM Rate Topic: -----

#1 nalexa1041  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 12-February 13

Jquery .post to .cfm (ColdFusion/Fusebox) not getting expected results

Posted 12 February 2013 - 04:32 PM

I am trying to incorporate an existing Coldfusion/Fusebox (CF) application into a separate external application. The external application accesses the CF application via Asynchronous post using the JQuery $.post() method
  $.post("home/authenticate.cfm", { "organizationid": lid, "username": un, "password": pw },
        function (data, status) {
        $("#results").html(data).show();
   });


The CF is automatically defaulting back to the root index.cfm file instead of the home/authenticate.cfm without ever processing the home/authenticate.cfm file. No errors are generated or displayed. The code in the home/authenticate.cfm file is:
 <cfoutput>hi</cfoutput>
The desired output is to have “Hi” written in the div with the ID of “results”.
I have run the same post method using “home/response.asp” as the url which returns simple html. It works perfectly. The issue seems to be narrowed down to ColdFusion or Fusebox. We are using ColdFusion Version: 7,0,0,91690 and Fusebox V.4. 1 on IIS 7 web server.
Do you have any suggestions on how I can make the .cfm file work?

Is This A Good Question/Topic? 0
  • +

Replies To: Jquery .post to .cfm (ColdFusion/Fusebox) not getting expected results

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1866
  • View blog
  • Posts: 3,389
  • Joined: 13-January 08

Re: Jquery .post to .cfm (ColdFusion/Fusebox) not getting expected results

Posted 13 February 2013 - 04:17 PM

Hi nalexa1041 and welcome to DIC!

Questions like this are tough to troubleshoot because there's no telling the application configuration you're working with. That said, there is one early easy test you can do.

I see in your jQuery call that you're calling "home/authenticate.cfm" and you mentioned that you have two separate sites. Presumably the jQuery is on one of the sites and, if so, the call is to the other site, right? One site calling another site likely needs more than "home/authenticate.cfm" to successfully get there. What you have is a partial path that will have the calling app trying to access "home/authenticate.cfm" within itself.

Consider putting the full URL to the site that contains "home/authenticate.cfm" into your jQuery call and see what you get.

Good luck!

This post has been edited by Craig328: 13 February 2013 - 04:17 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1