Welcome Guest, Not a member yet? Register   Sign In
[Solved] Setting url in a .js file
#7

(11-02-2016, 03:20 AM)wolfgang1983 Wrote:
(11-02-2016, 03:07 AM)InsiteFX Wrote:
PHP Code:
<script type="text/javascript">
 
   var BASE_URL "<?php echo base_url();?>";
</
script

Your one worked plus on common.js miss spelt also filemanager so both now are fixed.


You can also do the same using site_url if you need the index.php
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Setting url in a .js file - by salain - 11-01-2016, 10:45 PM
RE: Setting url in a .js file - by wolfgang1983 - 11-02-2016, 12:34 AM
RE: Setting url in a .js file - by salain - 11-02-2016, 02:40 AM
RE: Setting url in a .js file - by InsiteFX - 11-02-2016, 03:07 AM
RE: Setting url in a .js file - by wolfgang1983 - 11-02-2016, 03:20 AM
RE: Setting url in a .js file - by InsiteFX - 11-02-2016, 09:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB