Passing a callback function to jQuery AJAX success function
问题 I'm trying to pass in a function to run when the AJAX call is successful, however it's not working as it say's that "callback is not a function". Example: Calling Code: getGrades(var); JS: function getGrades(grading_company) { // Set file to get results from.. var loadUrl = "ajax_files/get_grades.php"; // Set data string var dataString = 'gc_id=' + grading_company; // Set the callback function to run on success var callback = 'showGradesBox'; // Run the AJAX request runAjax(loadUrl,