Welcome Guest, Not a member yet? Register   Sign In
How to point to a controlle from a js file?
#1

[eluser]chefnelone[/eluser]
Hello.

I'm doing a ajax call (using jquery) from a js file like this:

Code:
$.post("http://www.mysite.com/site/order", order, function(theResponse)...

where site is the controller and order is the method
Is there any way to point the controller with this line:

Code:
$.post("site/order", order, function(theResponse)...

or should I use <?php echo base_url(); ?> in the js file as well?


Messages In This Thread
How to point to a controlle from a js file? - by El Forum - 01-26-2010, 04:37 AM
How to point to a controlle from a js file? - by El Forum - 01-26-2010, 11:41 AM
How to point to a controlle from a js file? - by El Forum - 01-27-2010, 05:41 AM
How to point to a controlle from a js file? - by El Forum - 02-15-2010, 09:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB