In Joomla 1.5 when I like to call AJAX, I add function in the controller like so
global $mainframe;
$idContact = JRequest::getVar('idContact');
$modelContact = $this->getModel('clientcontact');
if($modelContact->delete($idContact))
echo "1";
else
echo "0";
$mainframe->close();
And the controler return 1 or 0 (I dont need to use the raw or anthing else just tmpl=component
in the URL)
In the 2.5 I have an error wiht $mainframe->close();
I dont like to use the raw or modal layout