[eluser]CroNiX[/eluser]
For PHP paths, check out the constants defined at the bottom of index.php, like APPPATH, etc.
What I do for js paths, is in the header of my page I do:
Code:
<skript type="text/javascript">
// <![CDATA[
var base_url = "<?php echo base_url(); ?>";
// ]]>
</skript>
So, base_url is now defined globally and all of my external js scripts (that don't parse php) can use.
Then in ajax calls just use site_url + the rest of the url.