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
What to do is in your master template for your cake app create a global javascript variable that can be used throughout your application. Make sure it exists befor you do any JS includes too.
... ...