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? 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.