I have an app that works fine with debug=2, but I get 404 errors when i set debug=0 The message I get is "the requested location /urls/getTemplateData/2 does not exist on this server" On the server side I have the following code in url_templates_controller:
function getTemplateData($id) { $template = $this->UrlTemplate->find('where URLTemplateId=' . $id); $result = 'disaster' . ' -- ' . sizeof($template) . ' -- ' . $id; if( sizeof($template) != 0) { $result = 'excellente' . ' -- ' . sizeof($template) . ' -- ' . $id . ' --- '; } header("Content-type:application/xml"); echo '<URLTemplateId>' . $template['UrlTemplate'] ['URLTemplateId'] . '</URLTemplateId>'; echo '<URLTemplateDesc>' . $template['UrlTemplate'] ['URLTemplateDesc'] . '</URLTemplateDesc>'; echo '<result>' . $result . '</result>'; On the client side I call that as follows: function getUrlTemplateData(templateId,urlName,urlType) { var template = document.getElementById(templateId); var urlName = document.getElementById(urlName); var value = template.value; var url = '/url_templates/getTemplateData/' + value; var pars = 'value=' + value; var result = false; var myAjax = new Ajax.Request( url, { method: 'get', parameters: pars, evalScripts: true, onSuccess: function(transport) { if (transport.responseText.match(/excellente/)) { urlName.setValue(getXmlValue(transport.responseText, 'URLTemplateDesc')); result = true; } else { urlName.setValue({ background: 'pink' }); result = false; } } }); return result; } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---