ajax

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
visualblind's picture

Ajax implementation

hi all,
is there anyone experienced enough unlike me.. guys i've just started with drupal n i want ti know how can we implement Ajax with drupal.

i wanna develop a module that will define a block and will display 10 records from my database. add more link at the bottom will show next 10 n so one but woth no page refresh.

is there anyone who would like to help me with this

Sharad

Read more
starbow's picture

Ahah Forms v1.5 - Secure Dynamic Subforms

At the Drupal Summit, chx & eaton let me know that avoiding the FormAPI security by directly accessing $_POST was a bad idea. So I dropped the slide out of my presentation that talked about how to create dynamic subforms, and spend the last two weeks hacking like mad. I now have an approach that I believe combines convience and security. It is packaged up in Ahah Forms v1.5 as the dynamic_subform.module. It uses the same basic algorithm as drupal_get_form when #multistep is true (but is incompatible with #multistep, so don't try to use both of them).

I have a full write up at: Secure Dynamic Forms and Subforms, but here is an example of the functions in use:

Read more
kristan's picture

JOB: Looking for a green Drupaler

Web Applications Programmer

Reply to: employment@ewg.org

The Environmental Working Group (EWG) is a national, non-partisan organization that uses the power of information to protect the environment and human health. EWG seeks a detail-oriented, creative, deadline-driven applications programmer to assist with development of ewg.org and our other web sites. This full-time position is based in our Washington, D.C. headquarters.

RESPONSIBILITIES

Read more
starbow's picture

Views and Ahah Forms 1.3 released

I am really excited to announce the release of the work I have been doing to create an Ajax version of Views, by modifying ahah_forms and views_ui to work together . It took weeks longer than I anticipated, and required extending ahah_form.js and tweaking maybe 20% of views_ui, but I am very happy with the result. You can check it out yourself at http://demo.starbowconsulting.com/admin/build/views. The views_ui rewrite is available in the examples directory of ahah_form v1.2 (http://drupal.org/project/ahah_forms)

Update: I have removed the need to login to the site to administer views (some people were having trouble getting in).

Update: v1.3 released: Ok, I am probably just procrastinating reviewing my notes for friday's summit talk, but I have released a much simplified views_ui.module-example. The big thing I realized is that almost everything I really need to do can be done in the theming functions. Also, I have refined the ahah_forms.js visual effects and removed the yellow fade. This allows me to drop the two interface javascript files.

Read more
starbow's picture

AHAH Forms Framework released as a module

Sorry if I am spamming this group. My brain has been on fire, and I am hoping to get some feedback. Has anyone had time to look over the code and see if they think my approach is sound? Anyway, I will probably settle down soon :)

I repackaged the code and released it as a official module, so no more tarballs on my website (http://drupal.org/project/ahah_forms)

Also, I have submitted a proposal for a OSCMS Summit session on this material (http://2007.oscms-summit.org/node/226)

Read more
starbow's picture

AHAH goes to the polls

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).

Read more
starbow's picture

Towards an AHAH framework / automatic javascript generation

I have been having some really exciting ideas about getting the formAPI to generate the bindings to the javascript. I realized that all the javascript I wrote for the tutorial module could be generalized. Then with a bit of glue code, all of the parameters needed to do the event binding could be put in a properties set on the form element. This way Drupal coders could create modules with sophisticated AHAH effects without needing to write any Javascript at all. Here is an example of a button declaration with all of the info needed to do a incremental page update:

Read more
starbow's picture

Tutorial: A dynamically expanding AJAX/AHAH Drupal form

I have spent the last couple of weeks trying to figure out how to cleanly do dynamic forms with incremental page updates. I have put together an example module which is available for download. I have also put together a tutorial that explains my technique and the issues I ran into. I am interested in hear what people think of my approach.

http://www.starbowconsulting.com/blog/tao/dynamically-expanding-ajax-aha...

Read more
jason-gdo's picture

Drupal Developer Needed - Washington, DC

We have an immediate need for a Drupal consultant to assist with continuing development, theming, and site administration.

The candidate must be experienced in using Drupal, PHP, MySQL, Apache, and Linux to build highly scalable web platforms. Graphic design and CSS/HTML skills are highly desirable. Strong database experience and website performance optimization expertise would be plus.

If you are interested in learning more, please send an email with your resume and a brief description of your Drupal and PHP experience.

Ideally, the candidate is in the Washington, DC area.

Read more
andreashaugstrup's picture

Handling user access and Ajax

How does one handle access control when doing Ajax requests? Take a completely hypothetical example: I have my Drupal install setup in a way where only authenticated users may attach comments. I also want to add comments using an Ajax call instead of a normal fom submission (I said this was hypothetical, not that it was practical).

How would I make this secure? The comments box is stripped automatically for anonymous users, but anyone who knows where the Ajax call submits to will be able to send along the usual arguments. How do I make sure it was a validated user who submitted?

I have read some general articles on security and Ajax.

Read more
Subscribe with RSS Syndicate content