Have a look at the Drupal.settings object. Of interest to you is the basePath property.
On 11/22/2010 01:39 PM, Aldo Martinez Selleras wrote:
how I can write my code for the URL written in JavaScript are from the root of the site and are independent of whether they are clean URL enabled or not?
If y write this
$.get('?q=mycallback', function(data){ })
The code sends this
http://mysite.domain.com/current_url?q=mycallback
I have enabled the Clean URL, if I disable this option, then
If y write this
$.get('/mycallback', function(data){ })
The code sends this
http://mysite.domain.com/mycallaback
some suggest?