how we can print base_url in js file (in drupal)?please
base_url in js file
10k Views Asked by Atef Badran At
2
There are 2 best solutions below
1

You can use $base_path
. See en example on The Drupal JavaScript API under the "Drupal.settings" section.
Drupal 7
Drupal 8