What does the ajax code make requests to? Does it make HTTP requests to a Joomla component? Or is it a custom page created by com_php?
If you have firebug (firefox extension) you can view the HTTP requests in detail, and get a better idea of the problem. The JS console should also give you an idea of the error, it is available in native Firefox, Firebug, IE8, Chrome, Safari etc. I like the one that comes with Firebug the best, though IE8's is exceptional as well.
Cross domain issues is common also with AJAX. Even
www.domain.com and domain.com are not the same domain in the browser's same domain policy.