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

#3
[eluser]jairoh_[/eluser]
[quote author="anis2505" date="1372808560"]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;
}
[/quote]

yeah. tsk. anyway thankyou sir.


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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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