prototype javascript ajax请求运行后端perl脚本,但继续返回500

prototype javascript ajax请求运行后端perl脚本,但继续返回500,ajax,prototype,ajax.request,Ajax,Prototype,Ajax.request,这段代码很有用,因为对脚本的调用执行了它应该执行的操作,但是返回了条件500,我不明白为什么。我正在寻找任何建议或改变,我应该使这项工作 感谢所有回应的人 function get_update_odometer(vehicle_key,odometer_value){ var url = "[%Catalyst.uri_for('/invoice/dispatch_util/get_update_odometer')%]"; new Ajax.Request(url, {

这段代码很有用,因为对脚本的调用执行了它应该执行的操作,但是返回了条件500,我不明白为什么。我正在寻找任何建议或改变,我应该使这项工作

感谢所有回应的人

 function get_update_odometer(vehicle_key,odometer_value){
    var url = "[%Catalyst.uri_for('/invoice/dispatch_util/get_update_odometer')%]";
    new Ajax.Request(url, {
        method: 'get',
        parameters: {
           key: vehicle_key,
           ovalue: odometer_value
           },
        asynchronous:false,
        onSuccess: successFunc,
        onFailure:  failureFunc
       });
    var return_v  =  $('rcontainer').innerHTML;
    document.getElementById('odometer').value = return_v;
    return true;
}



function successFunc(response){
    if (200 == response.status){
      var container = $('rcontainer');
      var content = response.responseText;
      container.update(content);
    }
}

function failureFunc(response){
    alert("Call has failed " + response.status );
}

错误代码来自服务器端,您提供了客户端部分

因此,请查看您的服务器脚本“获取更新里程计”是否正常工作,是否可由web服务器调用等等