javascript - Ajax Start Event Firing after return from Controller -



javascript - Ajax Start Event Firing after return from Controller -

im trying show progressbar when page doing ajax request.

i creating dialog dynamically image within , show on ajaxstart event. problem when create ajax phone call ajax start fires after homecoming controller.

$(document).on('ajaxstart',function(){ alert('x'); $.openloading(); //method creating dialog , image });

in case alert called immediately. there not dialog created

but if write same code this

$(document).on('ajaxstart',function(){ console.log('x'); $.openloading(); //method creating dialog , image });

then in console x printed after returning controller action , still dialog not created. if run $.openloading() in console works fine expected.

please allow me know doing wrong??

alert() stops interaction browser until message dismissed , press ok button. while console.log() prints message console.

javascript jquery ajax

Comments

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -