4

For some reason the ahah functionality stopped working after a theme upgrade. I tried the simplest examples of ahah and it doesn't work. I also downloaded ahah-helper module, and even the example there doesn't work.

I copied exactly every code that's in this link : http://drupalsn.com/learn-drupal/drupal-tutorials/getting-going-ahah-and-drupal-6

when I submit a ahah form - the page loads again without any other affects (the form doesn't really gets submitted, form_submit not invoked).

i have no idea where to start looking for a solution....

I'm using drupal 6.

Moshe Shaham
  • 15,448
  • 22
  • 74
  • 114
  • If the functionality stopped after a theme upgrade, you should check the changes done with that upgrade. Main candidates to look at would be changes in the themes JavaScript files/code. – Henrik Opel Dec 26 '11 at 10:38
  • what does a working ahah javascript code should look like? meaning, what should i look for in the js files? – Moshe Shaham Dec 26 '11 at 15:35
  • @MosheShaham Is this a contrib theme? If so, which one and which version? – Alexander Dec 28 '11 at 08:13
  • 1
    @MosheShaham: Does your custom theme load a separate version of jQuery to the one included with Drupal core? – Clive Dec 29 '11 at 00:07
  • @Clive: Thanks a lot, that was exactly the problem! Really really appreciate it. How can I grant you the 50 points? – Moshe Shaham Dec 29 '11 at 08:15
  • @MosheShaham: happy to help I've been caught out by that a few times :) I'll turn the comment into a more useful answer and post it below, I think you'll be able to award the points then :) – Clive Dec 29 '11 at 12:51
  • I am not a Drupal expert but still I think this article would b helpful for others in this regard http://www.mindyourcode.com/php/adding-dynamic-form-elements-using-ahah-in-apply-for-for-role-module/ – Mashhadi Mar 07 '13 at 12:48

1 Answers1

2

This is happening because you have a second version of jquery loaded by your theme. This is either causing a conflict between jquery versions or introducing a jquery library that is incompatible with Drupal's core js.

As far as I'm aware the latest version of jquery that works with Drupal 6 is 1.3.2, which you can install using the jQuery update module. I've read reports of people getting v1.4 and even v1.5 to work but at the cost of some core functionality like AHAH

Clive
  • 36,918
  • 8
  • 87
  • 113