Foren

Alert Box until ajax complete function

Madasamy P, geändert vor 7 Jahren.

Alert Box until ajax complete function

Junior Member Beiträge: 90 Beitrittsdatum: 27.07.16 Neueste Beiträge
I have an aui:form
<aui:form>
<input type="file" name="supportFiles" multiple="true" id="new_Btn3"
onchange="save3()" autocomplete='off'/>
</aui:form>

function save3(){
AUI().use('aui-base','aui-io-request',function(emoticon{

B.io.request('<%=resourcURL.toString()%>',

{

dataType: 'json',
method: 'GET',
cache:false,
form: {
id:'<portlet:namespace/>fm',
upload:true
},
sync:true,

on: {

complete: function() {

<%= HtmlUtil.escape(importProgressId) %>.startProgress();
dataForm();
Fancy();

}
}
});

});

}


I want to alert some message until ajax complete function triggered
If complete function starts to work the alert message will be disappeared,Otherwise the alert box displayed
thumbnail
Byrån Zaugg, geändert vor 7 Jahren.

RE: Alert Box until ajax complete function

Expert Beiträge: 252 Beitrittsdatum: 06.04.12 Neueste Beiträge
You could display a message on start and hide it on complete
// ...
on: {
    start : function() {
        // show message
    },
    complete : function() {
        // hide message
    }
}
// ...
Madasamy P, geändert vor 7 Jahren.

RE: Alert Box until ajax complete function

Junior Member Beiträge: 90 Beitrittsdatum: 27.07.16 Neueste Beiträge
Byrån Zaugg:
You could display a message on start and hide it on complete
// ...
on: {
    start : function() {
        // show message
    },
    complete : function() {
        // hide message
    }
}
// ...


Thank you Bryan
It works