At first i just followed the example code to get an ajax sumbit working, but it wasn't working so I thought I was doing something wrong. I loaded up the examples module and the submit_driven_ajax example acts just like my form. Form page is being submitted just like a normal form.

Not sure if its something with my install or the code.

Comments

rfay’s picture

Status: Active » Closed (duplicate)

This is #634616: Various problems due to AJAX binding to mousedown instead of click, but it just got committed in #71 over there. I haven't tested to see if this has resolved it, but would appreciate it if you would.

I'm setting to duplicate, but hoping you'll test and respond.

rfay’s picture

And yay! I just tested and it does seem to have resolved it.

You'll need the latest dev of Drupal 7 to test as this went in on June 29, after 7.4.

I filed that issue in November, 2009 :-)

emackn’s picture

so this requires an ajax framework patch to make it work as expected?

does that mean http://api.drupal.org/api/drupal/includes--ajax.inc/group/ajax will also be changing for the newest D7 update.
Right now it explains to use the 'ajax-submit class' on the submit element. Is that just a work-around?

rfay’s picture

As I said, this is in the current dev version of D7.

emackn’s picture

so if using the dev version of D7 isn't an option, then what? I applied the patch from the #643616 (http://drupal.org/files/issues/634616-ajax_prevent_submit_d8-53.patch), and cloned example modules, submit_drive_ajax is still submitting the page as regular form, not via ajax.

Also got a dev 7.x version, also not working.

pillarsdotnet’s picture

Status: Closed (duplicate) » Postponed (maintainer needs more info)

Please describe your problem, using How to make an issue report as a guide.

It is very important that you give step-by-step directions that someone else can follow to duplicate your problem on their own test website.

emackn’s picture

The ajax_example modules submit-driven AJAX example works on a completely new install.

On my existing development site,
* I checked out the drupal 7 dev branch, copied over the sites and profiles (using a distro) directory from my D7.4 install
* then cloned the dev branch for the examples module.
* Enabled the ajax_example module via drush
* drush cc all
* visit the examples/ajax_example url.
* Hit submit button, button submit's form to current url. does not do ajax call and update element.

I'm going to try and rebuild my site and update my make file to pull in the d7-dev version to see if that makes a difference.

mile23’s picture

When I install ajax_example and go to examples/ajax_example, I see a list of all the various examples you can choose from. Did you mean examples/ajax_example/submit_driven_ajax?

This is with Examples 7.x-1.x and Drupal 7.16.

pfrenssen’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

I have just tested and reviewed this example and it works fine. Also since there was no followup posted to comment #7 in more than a year I'm confident this can be closed. In case the issue is not resolved please reopen.