Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Drupal 6 Module Development
  • Table Of Contents Toc
  • Feedback & Rating feedback
Learning Drupal 6 Module Development

Learning Drupal 6 Module Development

4.3 (16)
close
close
Learning Drupal 6 Module Development

Learning Drupal 6 Module Development

4.3 (16)

Overview of this book

Table of Contents (14 chapters)
close
close
Learning Drupal 6 Module Development
Credits
About the Author
About the Reviewers
Preface

Chapter 5. Using JavaScript and AJAX/JSON in Modules

The module we created in the last chapter used the theme system to provide user‑interface elements for our Philosophy Quotes module. In this chapter, we will pick up where we left off, and we will take steps toward a richer user interface.

In this chapter, we will use Drupal's JavaScript libraries (including the popular jQuery library) to add client-side features to the Philosophy Quotes module. We will also use AJAX (Aysnchronous JavaScript and XML) technology to dynamically change page contents without having to do a full page reload.

Here are some of the items we will cover while working on this module:

  • Using the Drupal and jQuery JavaScript libraries

  • Adding new locations (URLs) using hook_menu()

  • Building a JSON (JavaScript Over the Network) service

  • Fetching content using AJAX/JSON queries

Picking up Where We Left Off

In the last chapter, we built a module that read data from a custom content type, and displayed it as block content. This module...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Drupal 6 Module Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon