I see some code inside ajax.module to handle button tags (when determining the submitter), but IRL it does not work if using #type=>'markup'.
This is a useful method, since the markup tag allows you to embed images inside of your button tags (for instance), and one might call it an edge case.
For one), the class 'ajax-trigger' does not get added to the button element, and two) ajax.js only looks for 'input[type=submit]' elements to wire the click handler to.
Issue 1 is probably due to the fact that ajax_is_submitter() (line 210) doesn't check for the markup tag (0nly button and submit). Maybe check for '#executes_submit_callback' first? (required in this situation)
I hacked it almost working by adding class="ajax-trigger" to my button's markup, changing ajax.js (line 34) to s = $('input[type="submit"], button[type="submit"]', f); , and making sure the button has an id attribute (it needs to be referenced by id somewhere, apparently). I write 'almost', b/c it ajax-ifies and validates, but I get an unknown error (in a js alert()) when i actually submit.
Thanks for the great module, HTH.
Mike Waters
Comments
Comment #1
Mike_Waters commentedEDIT: I am not sure if this is helpful, but I 'enabled' ajax_ui_types_module() in ajax_ui.module (by sticking it in ajax_ui_get_types()), in order to allow my form to be found.