开发者

coldfusion ajax jquery cross-domain

I'm new to cross-browser ajax issues. I'm using the following code, which doesn't work if the cfc is on another domain and I need to rewrite it.

$.getJSON(cfroot + "/series.cfc?method=getSRDetailedTable&returnformat=json&queryformat=column", {"seriesID":seriesID,"insertTempData":true}, function(res,code) {
    //code here
});

I've played with examples from ben nadel and a few o开发者_开发问答thers, but just can't get it happening. Any constructive examples or help would be hugely appreciated. It doesn't need to use getJSON(). It can be a POST too. I just tend to use getJSON out of habit. In this scenario, the function performs calculations and updates a table. It doesn't actually get any data.

The cfc itself is huge, but the following is the first line:

<cffunction name="getSRDetailedTable" output="False" returnType="query" access="remote">


I'm not sure I understood your question, but I noticed "another domain", if this is the case here's something you need to read about crossdomain AJAX calls, possibilities and limitations:

http://www.ibm.com/developerworks/library/wa-aj-jsonp1/

http://jquery-howto.blogspot.com/2009/04/cross-domain-ajax-querying-with-jquery.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜