hello friends,
I am using ajax with jQuery in my cakePHP application.
and my javascript function is placed inside a javascript file.
now in my local system the files are kept in "/sample" directory so the the path while i call the function will be
in ajax.js
$.post({url : "/sample/controller/action"})
but after hosting it the url will become
$.post({url : "/mydomain.com/controller/action"})
in cakePHP we $html->url
to generate urls
but since this code is in js file i can't use that function
i don't want to change the all ajax action urls manually before hosting