English 中文(简体)
variable not being passed on when making a call through cfajaxproxy to a cffunction
原标题:
  • 时间:2009-11-16 21:30:41
  •  标签:
  • coldfusion
function getStateInfo(state){
  alert(state);
  var f = new funcs();
  f.setCallbackHandler(updateFormFieldStateInfo);
  f.setQueryFormat( column );
  f.qry_getLenderEvictionStateInfo(<cfoutput>#request.Lender_Id#</cfoutput>,state);
}

doesn t pass the state value to the ColdFusion function

问题回答

Here are a few observations that may help:

Is the alert() function defined in your prior code or is it being confused with javascript s alert() function? I don t believe that Coldfusion has a built in alert() function unless it s new in version 9.

A caution, not a problem, the var keyword must be defined at the very top of the function body unless you are using Coldfusion 9. Likewise, the "new" keyword is new to CF 9. I m guessing you re on version 9 since you re using both features.

For pre-Coldfusion 9:

function getStateInfo(state){
    var f = createobject("component","functs");
    alert(state);
    ...

Don t put the tags within cfscript. You don t need the hash marks either, although they won t cause harm. Hash marks are intended for use outside of coldfusion tags (including cfscript), in the main body of the html.

This line:

 f.qry_getLenderEvictionStateInfo(<cfoutput>#request.Lender_Id#</cfoutput>,state);

Should be:

 f.qry_getLenderEvictionStateInfo(request.Lender_Id,state);




相关问题
JQuery AJAX .load - flash chart doesnt load in IE

An IE issue has me completely stumped. I have a coldfusion page that uses JQuery s AJAX .load function to load in a new flash file that is generated by coldFusion s cfchart tag. This works completely ...

Best Coldfusion Library for OpenID [closed]

I am getting ready to start a project that requires using OpenID within Coldfusion 8. I have found a number of different options and was wondering what has worked the best, get s the most support, ...

Find ColdFusion Generated ID

Is there a way to find the elements generated by ColdFusion s <CFLayout> and <CFLayoutArea> tags? These tags: <cflayout type="tab" name="MyAccount"> <cflayoutarea name="...

ColdFusion COM error

I am upgrading from CF4.5 to CF8. Calls to COM dll s that used to work in version 4.5 now throw a "Complex object types cannot be converted to simple values.." error. The COM object has a few arrays ...

What s the best way to write engine-specific CFML code?

Sometimes it is necessary to write different code for Adobe ColdFusion vs Railo vs OpenBD, due to differences in implementation. Do people have a specific method that they use for this? For example, ...

热门标签