jQuery getScript issue in IE
We have validation rules in an external JS file that is being called via jQuery getScript:
$开发者_JS百科.ajaxSetup({async:false});
$.getScript('scripts/validation/createPosting.js', function(){ checkFoapalPercentage(); });
$.ajaxSetup({async:true});
The script works fine in all other browsers (Firefox, Chrome, and Safari).
Any idea why we're getting a Javascript error (Object expected) on a line that's referencing a method in the external JS file?
Thanks.
Your question doesn't have nearly enough info in it ... Where is checkFoapalPercentage
defined (in createPosting.js
)? What does it return? Which line is throwing the error?
I think you mean checkFoapalPercentage is defined in createPosting.js
, in which case the error could be because IE is (correctly) trying to refer to an as-yet-undefined function.
If you post some more info, I'll give it a whirl.
精彩评论