Welcome Guest, Not a member yet? Register   Sign In
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



Theme © iAndrew 2016 - Forum software by © MyBB