Copy link to clipboard
Copied
Hello, all,
I've got three forms that are submitting form data via AJaX to a CFC and it's working GREAT!
I've got ONE form that I'm trying to do the same thing, but FireBug is returning a 404 error. I've checked the http path, and it is correct. But the AJaX function that is submitting the data keeps erroring with a 404.
Any thoughts on what might prevent AJaX from finding one CFC, but not the other?
V/r,
^_^
Copy link to clipboard
Copied
Is it possible that you have either a case sensitivity issue or a permissions issue?
Copy link to clipboard
Copied
Hi, fergusondj, thanks for your reply.
The files are all uploaded via the same FTP account into folders that are given appropriate permissions, so a permission issue is unlikely. I'll see if any are showing different.
The naming convention for the CFC files is ALL_UPPERCASE.cfc, and they are all following that convention (NEWS.cfc, PUBLIC.cfc, etc.)
^_^
Copy link to clipboard
Copied
I checked the permissions, and both .cfc files are identical as far as permissions go.
V/r,
^_^
Copy link to clipboard
Copied
I have NO idea what just happened.
I changed the JS from this:
$('#submitBtn').on('click',function(e){
frm = $('#estimateForm');
frm = frm.serializeArray();
postURL = 'http://www.domain.com/components/ERC.cfc?method=getCostEstimate';
$.ajax({
type: 'post',
url: postURL,
data: frm
}).done(function(data){alert(data)});
.. to this..
$('#submitBtn').on('click',function(e){
postData = $('#estimateForm').serializeArray();
postURL = 'http://www.domain.com/components/ERC.cfc?method=getCostEstimate';
$.ajax({
type: 'post',
url: postURL,
data: postData
}).done(function(data){alert(data)});
.. and it is now working.
Any thoughts on what was going wrong? I don't get it.
V/r,
^_^
Copy link to clipboard
Copied
Have you left out code? This is invalid javascript. You have brackets missing. The closing brackets for the .on function are missing.
Copy link to clipboard
Copied
They are not missing in the actual document. They are missing, here, because I have to manually type everything because my dev environment is isolated from the internet. Those slipped my mind as entered. And I don't have CD burn permissions and flash/thumb drives are disabled (and will trigger an alert to network admins who have MPs on speed dial.)
V/r,
^_^