I'm looking to a way to make a call to a PHP function in my Drupal 6 module, and return the result asynchronously to the page.

I'm familiar with jQuery AJAX, but I don't understand how to post to a function using it. Does anyone have experience on doing this?

  • 2
    If you're trying to manipulate a form you'll need to use AHAH. If not, implementing a menu callback as jdu suggests is the way to go
    – Clive
    Aug 7, 2012 at 13:56

1 Answer 1


Disclaimer: I've never done this with Drupal 6.

You want to use a menu callback: You create a menu item (which is just a path associated to a PHP function), and point your query request at that path.


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.