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
Post a Comment