留言板

Using AUI Loading Mask during AJAX call

Gaurish Sharma,修改在11 年前。

Using AUI Loading Mask during AJAX call

New Member 帖子: 22 加入日期: 09-1-23 最近的帖子
Hi,

I have to set up IPC between 2 portlets. The scenario is -
1) Enter keyword in a text box in portlet1. When user clicks Search, through Liferay.fire event is published.
2) Portlet2 listening to this event via Liferay.on, gets the searched keyword, executed the business logic to find the search results for the keyword and on success display the search results.

Now, I wish to show the loading mask when the search is in progress. Please find the code below for listening portlet -

Liferay.on(
'retrieveValue',
function(data) {
AUI().use('aui-io-request', function(A) {
A.io.request("<%= searchURL %>", {
method : 'POST',
data: {search: data.key},
dataType : 'html',
on : {
success : function() {
var message = this.get('responseData');
A.one("#placeholder").html(message)
}
}
});
});
});

I looked out for any such example on web but couldn't find it. Does anyone has any idea how this we show AUI Loading Mask in such scenario?

Thanks,
Gaurish
thumbnail
mohammad azaruddin,修改在10 年前。

RE: Using AUI Loading Mask during AJAX call

Expert 帖子: 492 加入日期: 12-9-17 最近的帖子
HI

Did you solve this issue