I have the following jQuery 1.7.2 code:
var theParams = encodeURIComponent(s1)+encodeURIComponent(s2);
$.post('/myURL',theParams,processData).error(errorResponse);
function processData(data,textStatus){
blah blah;
}// end processData
function errorResponse() {
blah blah;
}
This code works fine on Safari 6 (Mac), Chrome 21 (Mac), Safari (iPad), Chrome (iPad),
but FF 14 (Mac) gives me the following error:
ReferenceError: processData is not defined
Oddly, similar code (from a different page) works just fine on FF:
var formData = $(form).serialize();
$.post('/myURL',formData,processData).error(errorResponse);
function processData(data,textStatus) {
blah blah;
}// end processData
function errorResponse() {
blah blah;
}
I’ve tried renaming the function, but that results in the same undefined error. What should I look for to debug this?
Try rearranging your code
Does this work for you ?
can you provide the
encodeURIComponentfunction also please ?