• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing variable to external javascript file in uri

#2
[eluser]TheFuzzy0ne[/eluser]
Why not keep the file untouched, and just add something to the page itself, like this to your view:

<script type="text/javascript">
var base_url = '&lt;?php echo base_url(); ?&gt;';
</script>

You'd probably need to print that before you load the external script, however.


Messages In This Thread
Passing variable to external javascript file in uri - by El Forum - 04-11-2009, 10:08 AM
Passing variable to external javascript file in uri - by El Forum - 04-11-2009, 10:14 AM
Passing variable to external javascript file in uri - by El Forum - 04-11-2009, 10:33 AM
Passing variable to external javascript file in uri - by El Forum - 04-11-2009, 10:37 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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