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
satya - Friday, June 03, 2011 10:46:21 PM
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.
satya - Friday, June 03, 2011 10:46:35 PM
developing for drupal book
This is the same url pointing to the drupal development book.
satya - Friday, June 03, 2011 10:55:03 PM
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?
satya - Monday, June 06, 2011 11:25:11 AM
drupal_add_js
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.
satya - Monday, June 06, 2011 11:26:27 AM
api reference to drupal_add_js
satya - Monday, June 06, 2011 11:28:07 AM
you can include a .js file for your module like this
function satya_test_module_init()
{
drupal_add_js(
drupal_get_path('module','satya_test_module')
.'/js/some.js');
}
satya - Monday, June 06, 2011 11:28:52 AM
ajax hover sample
ajax hover sample
satya - Monday, June 06, 2011 2:04:52 PM
jquery ajax call
jquery ajax call
satya - Monday, June 06, 2011 2:07:31 PM
here is the ajax api from jquery
satya - Monday, June 06, 2011 2:10:13 PM
retrieving a url
var html = $.ajax({
url: "some.php",
async: false
}).responseText;
satya - Monday, June 06, 2011 2:17:20 PM
some jquery help: my prev notes on jquery
satya - Monday, June 06, 2011 2:43:48 PM
You can do this in a drupal basic page
<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.
satya - Monday, June 06, 2011 2:44:34 PM
You can enable php filter module
If you want to execute php scripts in your basic page.
satya - Wednesday, June 08, 2011 9:51:23 AM
what do I know so far about ajax and drupal
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
satya - Wednesday, June 08, 2011 9:52:41 AM
what I don't know yet
The ajaxified libraries of drupal
relvance and use of ajax.inc
satya - Wednesday, June 08, 2011 9:54:39 AM
Goal of this article
how do i make ajax calls (answered)
how to take advantage of ajax in drupal
what modules/libraries exist for ajax