Use CRM.url() to generate the url of the ajax service.