Doug wrote:
On Tue, 11 May 2010, Earnie Boyd wrote:
Doug wrote:
One of the issues I encountered, in Drupal 6 is that every Forms API button, thinks its a "submit" button and wants to callhome for a page refresh, rather than an asynchronous background page update.
But you can have more than one button on the page each with its different submit handlers specified with '#submit'. Same for '#validate'.
The issue I had was this one: http://drupal.org/node/50147 Basically every button is a "submit" button which causes a page refresh - the antithesis of AJAX.
All, I can say is that I too have noticed that a '#type' => 'button' is more of a '#type' => 'submit' than not. Too bad you're not pointing at a Drupal core issue that could perhaps use some of what is stated in the forum post that is no lost to deprecation. I have yet to get big into AJAX but do like what it can do. I'm using the ajax item list pagers that come with Views in Panels on my for-my-kids.com site. Kind of nice that I can page in the panel without refreshing the entire form.