Javascript: Uncaught exception: "too few args"
- by Rosarch
I think I must be making some really stupid mistake. I'm using the latest version of jQuery to write an AJAX app.
function refreshGPAForTerm(term) {
var meta_data = term.children('.' + TERM_META_DATA_CLASS);
meta_data.children('.' + MEDIAN_GPA_CLASS).fadeOut('slow').remove();
meta_data.append(_getMedianGPAElem(term.data('GPA'))).hide().fadeIn('slow');
}
function moveToTerm(original_course, helper, term) {
var cloned_course = original_course.clone(true);
term.data('credits', term.data('credits') + cloned_course.data('credits'));
term.data('median_GPA', term.data('median_GPA') + cloned_course.data('credits') * cloned_course.data('GPA'));
// error here
refreshGPAForTerm(term);
refreshCreditForTerm(term);
original_course.addClass('already-scheduled');
original_course.draggable('disable');
cloned_course.appendTo(term).hide().fadeIn('slow').draggable();
}
When refreshGPAForTerm(term) is called, Firebug displays: "Uncaught exception - Too few arguments". Stepping through in a debugger, the code then goes into jQuery. Why is this happening? What am I doing wrong?