Wondered if someone could help me; the nuts of the problem is I am getting a 404 from ActionResult in a SurfaceController.
I am trying to replicate the ajax pagination in AjaxVacancyoverview example in the Hybrid Framework.
Hence I have add the following:
To my controller:
public ActionResult AjaxNewsList()
{
//We don't use CreateMasterModel because we dont need the base model properties.
//Only the vacancy overview part is reloaded.
var model = GetContainer();
//This page is loaded with jquery and sometimes it loads old (cached) data. This prevents that.
Umbraco.DisableCache();
return CurrentTemplate(model);
}
function initAjaxPaging() {
if ($('.pagination').length) {
// Setup content
initContent();
// Setup loader
$(".vacancy-layer").prepend("<div class='do-loader abslt' style='display:none;'><img src='/css/images/bx_loader.gif' border='0' /></div>");
$(document).ajaxComplete(function () {
//Update the url's again.
initContent();
//Show the new content with a fade effect.
$(".do-loader").fadeOut(250);
});
$.address.change(function (event) {
var page = event.parameters['page'];
if (page) {
var qs = "?page=" + page
var level = event.parameters['level'];
if (level){
qs += "&level=" + level
}
//Build the ajax url.
var ajaxUrl = $.address.baseURL().split('?')[0];
if (!endsWith(ajaxUrl, "/")) {
ajaxUrl += "/";
}
ajaxUrl += "ajaxnewslist/";
// Load content
$(".do-loader").fadeTo(0, 0.8, function () {
$(".vacancy-overview").load(ajaxUrl + qs);
});
}
});
}
}
As per the AjaxVacancyoverview; the problem is I am getting a 404 from my AjaxNewsList() ActionResult.
In the HybridFramework If I can the of the ajaxUrl , view name and action result in the controller from AjaxVacancyoverview to AjaxVacancyoverview2 I also receive a 404 which makes me think I have missed a single step.
Can someone please help me; been looking at this for nearly 2 days now and still am stuck.
Recreating the Hybrid Framework AjaxVacancyoverview pagination
Hello everyone,
Wondered if someone could help me; the nuts of the problem is I am getting a 404 from ActionResult in a SurfaceController.
I am trying to replicate the ajax pagination in AjaxVacancyoverview example in the Hybrid Framework.
Hence I have add the following:
To my controller:
An additional view called: AjaxNewsList.cshtml:
An finally my js:
As per the AjaxVacancyoverview; the problem is I am getting a 404 from my AjaxNewsList() ActionResult.
In the HybridFramework If I can the of the ajaxUrl , view name and action result in the controller from AjaxVacancyoverview to AjaxVacancyoverview2 I also receive a 404 which makes me think I have missed a single step.
Can someone please help me; been looking at this for nearly 2 days now and still am stuck.
is working on a reply...