This works on my dev machine, but not on a production server. I am trying to update some divs with ajax, but they are not updated, though other parts work fine. I am using IIS 6 on the server. When I debug this code on the server side with firebug, it does not hit any breakpoints I add to the success function.
Script:
function updateServiceInfo(nodeId) {
var id = { id: nodeId };
$.ajax({
url: '/ServiceInfo/ServiceInfoPartial',
type: 'GET',
data: id,
dataType: 'html',
success: function (data) {
$('#serviceInfoContent').html(data);
},
error: function (request, error) {
}
});
}
Controller:
public class ServiceInfoController : Controller
{
public ActionResult ServiceInfo()
{
return PartialView("ServiceInfo");
}
public ActionResult ServiceInfoPartial(string id)
{
return PartialView("ServiceInfoPartial");
}
}
Views:
serviceinfopartial
@model string
<p>
Немає опису</p>
serviceinfo
<div id="serviceInfo">
<div id="ContainerPanel" class="ContainerPanel">
<div id="serviceInfoHeader" class="collapsePanelHeader">
<div id="dvHeaderText" class="HeaderContent">
Опис сервісу</div>
<div id="dvArrow" class="ArrowClose">
</div>
</div>
<div id="serviceInfoContent" class="serviceInfoContent">
</div>
</div>
</div>
The response that is returned in the console is
GET http://localhost/Managers/GetManagers?nodeId=563344 404 Not Found 42ms