how do i make ajax calls (answered)
how to take advantage of ajax in drupal
what modules/libraries exist for ajax
How is ajax integrated into drupal

drupal ajax

Search for: drupal ajax

using ajax in drupal

This is a link pointing to the drupal development book on the drupal site. This points to a section titled doing ajax in drupal using jquery. This is not a very useful url by itself. But it points to the rest of the docs on javascript related stuff.

developing for drupal book

This is the same url pointing to the drupal development book.

ajax api support

This is the link pointing to the ajax api in drupal. This is implemetned in ajax.inc file. This link lists the functions available in ajax api. It is not really clear how these functions are used.

How are these functions used?

ajaxify a link

drupal_add_js

Search for: drupal_add_js

This is documentation for this function. It is not clear where I would use this. Is it only in the template files? Or can it be called in page callbacks?

I guess as the next example shows this can be called duing module init.

api reference to drupal_add_js


function satya_test_module_init()
{
  drupal_add_js(
      drupal_get_path('module','satya_test_module')
             .'/js/some.js');
}

ajax hover sample

Search for: ajax hover sample

jquery ajax call

Search for: jquery ajax call

here is the ajax api from jquery


var html = $.ajax({ 
  url: "some.php", 
  async: false 
 }).responseText;

some jquery help: my prev notes on jquery


<script>
function callme()
{
// alert('hello');
// jQuery("#MyId").html("Not at all");
alert('start');

var s = jQuery.ajax({ 
  url: "/satyatest", 
  async: false 
 }).responseText;

  alert(s);
  alert('done');
}
</script>

<form>
<input type="button" name="button" 
  value="pressme" onClick="javascript:callme();"/>
</form>

<p id="MyId">
Hello there
</p>

This will allow you to test ajax using content in your drupal.

If you want to execute php scripts in your basic page.


jquery is included in drupal
you can use it in your .js files
you can use jquery ajax functionality
you can use a basic page content to test your js files
you can include a js file in your module init if needed
The file ajax.inc contains drupal utilities built on top of ajax
ajaxified form and link are an example of this

The ajaxified libraries of drupal
relvance and use of ajax.inc

how do i make ajax calls (answered)
how to take advantage of ajax in drupal
what modules/libraries exist for ajax