Welcome Guest, Not a member yet? Register   Sign In
Error: The URI you submitted has disallowed characters
#4

[eluser]CroNiX[/eluser]
Well, as I said, php doesn't get parsed in js files as evidenced by what you just posted (it's not interpreting the php, its posting it literally).

Easiest thing to do is create a js variable in the head of your php template which all of your javascript files can then use.

Code:
var base_url = "<?php echo base_url(); ?>";

Then in your javascript files, just base_url + 'controller/method/etc' to create the urls.


Messages In This Thread
Error: The URI you submitted has disallowed characters - by El Forum - 02-26-2012, 01:46 PM
Error: The URI you submitted has disallowed characters - by El Forum - 02-26-2012, 02:06 PM
Error: The URI you submitted has disallowed characters - by El Forum - 02-26-2012, 02:11 PM
Error: The URI you submitted has disallowed characters - by El Forum - 02-26-2012, 02:25 PM
Error: The URI you submitted has disallowed characters - by El Forum - 02-26-2012, 02:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB