0

I want to run JavaScript code upon a form being submitted preceding other default tasks that are carried out on form submission.

May anyone suggest some approaches?

1
  • What type of JavaScript code do you need to run before the form handlers are invoked?
    – avpaderno
    Commented Jun 1, 2011 at 5:33

1 Answer 1

1

Depending on the type of code that you need to run, and from the Drupal version, AHAH and AJAX could be the answer.

On Drupal API, there is example code for AHAH (Drupal 6), and AJAX (Drupal 7 and higher).

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.