Home ›
Must invoke 'settings' with Drupal add javascript function to have base path and such availableMust invoke 'settings' with Drupal add javascript function to have base path and such available
Submitted by Benjamin Melançon on April 3, 2010 - 10:36am
[not sure this works, actually, but this code as is seems to]
Called in ucmenucart.module
This is ucmenucart.js
$(document).ready(function() {
// alert('bp: ' + Drupal.settings.basePath);
$.ajax({
url: Drupal.settings.basePath + 'ucmenucart/ajax',
success: function(data) {
$('#ucmenucart-ajax').replaceWith('ha' . data);
alert(url + 'Load was performed.');
}
});
// $.getJSON( Drupal.settings.basePath + 'ucmenucart/ajax'), );
})
Searched words:
drupal_add_js drupal_get_path module settings
Comments
Post new comment