AHAH goes to the polls

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by starbow on February 13, 2007 at 3:32am

In response to my AHAH tutorial on groups.drupal.org, Moshe asked if that module could be used to make the poll module dynamic (http://groups.drupal.org/node/2747#comment-7670). I said "not exactly", but it go me thinking, and that lead me to create the beginnings of an ahah framework. To test it out, I just modified poll.module to use the framework. It went pretty quick. The hardest part was step two getting the form to be dynamic with full page refreshes (and most of that time was stripping out the multiple fields-per-form code from my example). The javascript bindings where done in a couple of minutes, thanks to the framework. I think I am on to something here. You can try it out for yourself. Login to http://www.starbowconsulting.com as test/test and create a new poll (ps. looks best with FireFox).

You can download the modified poll.module and the ahah files (couple of bug fixes from last time) here

Categories:

Comments

In use in advpoll

Posted by anders.fajerson on March 3, 2007 at 10:08am

I haven't looked on how you implemented it, but I added this to the advpoll module some time ago. Would be interesting to see how our approaches differ.

Hey starbow, Seems to be

Posted by Laurentvw on July 30, 2007 at 10:00am

Hey starbow,
Seems to be working fine, but when voting, the page reloads. I was wondering if we could use the same method to avoid reloading after pressing the Vote! button. It would be useful when you have inserted your poll somewhere on the bottom of the frontpage, and you don't want the page to reload when your vote is casted.

Javascript

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /