Text Size
Sunday, May 20, 2012
Get a look down
Sunday, 17 July 2011 12:43

How to get Drupal's basepath in JavaScript

Written by Nabil Sadki
Rate this item
(0 votes)
Here's a little code snippet that gives you the possibility to get the base path of your drupal sites in javascript :
1
2
3
$(document).ready(function() {
	alert(Drupal.settings.basePath);
});
Last modified on Monday, 18 July 2011 15:11
Nabil Sadki

Nabil Sadki

Hello, I am Nabyl, a Freelance web developer and a joomla addict. I have made many sites using the latter, but also patches for the core of this CMS. I like HipHop culture and world of warcraft. You can find find me on Twitter when i'm free...

Website: www.coins.ma E-mail: This e-mail address is being protected from spambots. You need JavaScript enabled to view it

Add comment



Usefull tricks