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

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -