Working on a MVCPortlet (Liferay 6.2).
Is there any reason why this ajax call works on a regular jsp of my portlet, but does not work on the config page of the portlet (the jsp that opens when you click top right corner and then configuration and option).
In this case, the portletURL
is correctly displayed (alert), the JS returns success but the controller never received the client request.
Here's the ajax call:
$.ajax({
url: portletURL,
type: 'POST',
dataType: 'text',
cache: false,
data: {
test: test
},
success: function(data) {
alert('success ajax');
},
error: function(http, message, exc) {
alert('error ajax');
}
});
Again, this code works perfectly an another jsp.
Does this ring a bell to anybody? Thanks in advance.