I am trying to access cfc in handler with ajax call in my coldbox application,
following the ColdBox Dashboard demo, but it doesn’t functioning
for me…
My code is simple, onchange of a selectbox im trying to load some more form fields using ajax call
<select name=“detail” onchange=“javascript:doEvent(’#Event.getValue(“clientInfo”)#’,‘clientFormFields’,{appName:this.value});return false;” >
The onchange request is returning the desired form fields, but below that it showing the below mentioned error.
The code is again trying to processColdBoxRequest() .
I don’t understand why im getting below mentioned error. Im using coldbox version 3.5.2.
Anyone please help me to overcome this issue.
You don’t say what the error message is, you say it is returning the desired form fields. And I am guessing that this is a JavaScript error, that you are getting. If this is the case, may I suggest using Chrome and the developer tools, to debug and if needed line debug the code and trace why it is happening the way it is happening.
Without the error, or any code as to where abouts the error is happening, it is impossible to guess what your problem is.
Andrew,
Thanks for your reply,
Im sure that is not a Javascript error.
The onchange event of this selectbox is returning the HTML.
<select name=“detail” onchange=“javascript:doEvent(’#Event.getValue(“clientInfo”)#’,‘clientFormFields’,{appName:this.value});return false;” >
After returning the the HTML the processColdBoxRequest() is getting executed and causing errors. I have attached the screenshot for reference.
My requirement is to stop the execution once the ajax call returns the HTML data, but currently the application is executing the onrequeststart() on Application.cfc after the ajax call.
The doEvent() javascript function is same as in ColdBox Dashboard demo.