I have been trying to call a different controller from a jsp page that is not associated with that controller. What I'm trying to do: The jsp loads from controller A, after the page loads I want to then call Controller B without changing the page location.
I've tried a number of things and have yet to be successful.
Ajax try:
$(window).load(function () {
var url = $('#analyticLog').attr('href');
$.ajax({
type: "POST",
url: url,
success: function(html)
{
$("#analyticLogAjax").replaceWith($("#analyticLogAjax",$(html)));
},
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(thrownError);
}
});
});
window.location try:
$(window).load(function () {
window.location = $('#analyticLog').attr('href');
});
There is an anchor being referenced in each that points to the action from which the controller is mapped to. Ive also played with the view controller that handles our action requests and mappings hoping to enable null views to not reference a new 'view'. But then my 500 check is caught is pass's that view.
I know this is kind of all over the place. But if I could find a way to call my class without changing the view it would be immensely beneficial.