Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Drupal 7 advanced ajax

on

  • 44,561 views

 

Statistics

Views

Total Views
44,561
Views on SlideShare
23,445
Embed Views
21,116

Actions

Likes
14
Downloads
324
Comments
0

20 Embeds 21,116

http://www.angrydonuts.com 20762
http://angrydonuts.com 114
http://it-republik.de 89
http://translate.googleusercontent.com 29
http://webcache.googleusercontent.com 29
http://entwickler.com 24
http://entwickler.de 23
http://d6.angrydonuts.com 18
http://192.168.0.117:8090 10
http://www.slideshare.net 3
http://localhost 3
http://d7.angrydonuts.com 2
http://paper.li 2
http://www.netvibes.com 2
http://a0.twimg.com 1
http://webinale.de 1
http://phpmagazin.de 1
http://www.javamagazin.de 1
http://duckduckgo.com 1
http://web.archive.org 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Drupal 7 advanced ajax Drupal 7 advanced ajax Presentation Transcript

  • Drupal 7 Advanced AJAX
    Tips and Tricks
  • Summary
    Non-form related AJAX
    Responding to an AJAX request
    Bind AJAX behavior to a simple link
    In more than one way
    Modify this behavior via javascript
    Modify the AJAX response via javascript
    Use a custom response command
    Perform AJAX on non-traditional events like a timer.
  • We are skipping #ajax
    This is the basic usage
    Plenty of examples in examples.module
    Too tied to the form id and cache
  • Responding to an AJAX request
  • Drupal’s AJAX Commands
    http://api.drupal.org/api/drupal/includes--ajax.inc/group/ajax_commands/7
  • Simplest Example
    <a href="/aajax-example/simple/nojs" id="aajax-example-1" class="use-ajax">Simple example</a>
    l(t('Simple example'), 'aajax-example/simple/nojs', array('attributes' => array('id' => 'aajax-example-1', 'class' => 'use-ajax')))
  • Second verse, same as the first
    <a href="/aajax-example/simple/nojs" id="aajax-example-2" class=“aajax-example use-ajax">Simple example 2</a>
  • Setting up the AJAX event
    Use Drupal’s behavior
    Bind to a DOM object
    Fill in the element_settings
    Register the Drupal.ajax object
  • Element Settings
    Also:
    • wrapper
  • Let’s see this again
    <a href="/aajax-example/simple/nojs" id="aajax-example-2" class=“aajax-example use-ajax">Simple example 2</a>
  • Manipulating the response
  • Custom AJAX Command
    Javascript side
    PHP Side
  • What about things that are not clicks?
  • Wrapping up
    This framework can integrate into strong javascript applications.
    Server can be used for storage, rendering and decision making.
    Client can be more interactive.
    Framework can add additional CSS and javascript to page automatically.