• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
calling base_url() or site_url() in the external js file

#2
[eluser]anis2505[/eluser]
Hi, I don't think that's possible. the best way -as I think- you just create a js script and create these two function and include this script at the top of you web pages

Code:
JS File

var baseUrl = "you/base/url";
var siteUrl ="your/site/url";
var index="yourindex.php";

function base_url(uri){
return baseUrl+uri;
}

function site_url(uri){
  return siteUrl+index+"/"+uri;
}


Messages In This Thread
calling base_url() or site_url() in the external js file - by El Forum - 07-02-2013, 04:42 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.