I'm trying to set up a Webform with AJAX submission. I've tried 3 approaches in order to complete it, all 3 resulted in the same problem.

I've tried the Webform AJAX module, I've tried a code from this answer and I've tried another module that is in sandbox only in Drupal.org but it supposed work just fine.

Some of these approaches worked on other Drupal projects on mine but not on the current one.

After clicking on the Submit button, the little AJAX loading gif shows up and then the gif remains there but the submission never finishes, the form doesn't get submitted. Exactly the same problem for all approaches.

This is a JS error I'm getting in console

Uncaught TypeError: Object function ( selector, context ) {
        // The jQuery object is actually just the init constructor 'enhanced'
        return new jQuery.fn.init( selector, context, rootjQuery );
    } has no method 'handleError' jquery.form.js?v=2.52:12
s jquery.form.js?v=2.52:12
window.(anonymous function) jquery.form.js?v=2.52:12

Do you have any idea what could possibly cause a bug like this in Drupal 7 with AJAX webform submission?

  • 1
    Have you checked the watchdog log after the failure? Also you say "nothing happens" after the ajax loading gif, does that mean the loading gif disappears (i.e. the ajax request finishes) or does the loading gif persist and doesn't go away? (i.e. the request never finishes).
    – Beebee
    Commented Jul 24, 2013 at 11:27
  • It's the latter, I've edited my question. The gif will stay but the request never finishes. I'm taking a look into watchdig log Commented Jul 24, 2013 at 11:34
  • I'm not seeing any messages in watchdog log related to this Commented Jul 24, 2013 at 11:41
  • 1
    I'm afraid that without server-site logs (or confirmation server never seen the request at all) and description what user agent says about it (Firebug console & http log or similar in other browsers) there is no way to answer this question.
    – Mołot
    Commented Jul 29, 2013 at 10:46
  • 1
    My advice in this situation would be to open up the webform ajax module, look up its hook_menu find the function that's the page callback for the ajax url. From there I'd start stepping through the code either using xdebug, or you can do it the old school way of dpm'ing or die(var_debug($variable)) etc just need to isolate the issue and find what's exactly happening after the ajax call.
    – Beebee
    Commented Jul 31, 2013 at 14:11

1 Answer 1


I've solved the problem with using jquery.form plugin and submit the form via AJAX with the help of this plugin.

I've found this solution in this answer


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.