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



Theme © iAndrew 2016 - Forum software by © MyBB