我在我的Mvc应用程序中有微调器我工作正常但它允许用户界面加载微调器如何解决这个问题我不需要用户界面微调加载 [英] I Have Spinner In My Mvc Application I Works Fine But It Allow User Interface While Loading Spinner How To Solve This Problem I Don't Need To User Interface While Spinner Loading

查看:57
本文介绍了我在我的Mvc应用程序中有微调器我工作正常但它允许用户界面加载微调器如何解决这个问题我不需要用户界面微调加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <   div     id   =  spinner    class   =  spinner    style   =  display:none; >  
< img id = img-spinner src = 〜/ Cont ent / Images / ajax-loader(1).gif alt = 处理请等待 / >
< / div >



 $( document )。ajaxStart( function (){
$( .spinner)。show();
});
$( document )。ajaxSend( function (){
$(< span class =code-string> .spinner)。show();
});
$( document )。ajaxStop( function (){
$(< span class =code-string> .spinner)。hide();
});



 <   div     id   =  spinner    class   =   spinner    style  < span class =code-keyword> =  display:none; >  
< img < span class =code-attribute> id = img-spinner src = 〜/ Content / Images / ajax-loader (1).gif alt = 处理请等待 / >
< / div >





这是我的布局页面编码

 $( document )。ajaxStart( function (){
$( .spinner)。show();

});
$( document )。ajaxSend( function (){
$(< span class =code-string> .spinner)。show();

});
$( document )。ajaxStop( function (){
$(< span class =code-string> .spinner)。hide();
});





这是我的common.js文件编码



当ajax启动时自动调用spinner当ajax停止它们的功能时停止它工作正常但是在运行微调器时它允许用户界面

(例如)

当用户点击提交(保存)按钮以保存用户注册页面i加载微调器指示应用程序工作背景请勿打扰它在此功能期间用户界面处于活动状态,这时微调器运行用户可以与其他功能进行交互。



请任何人解决这个问题



i不允许用户与用户界面进行交互,而微调器运行我怎么能这样做请帮助我

解决方案
< blockquote>( document )。ajaxStart( function (){


.spinner)。show();
});


document )。ajaxSend( function (){


<div id="spinner" class="spinner" style="display:none;">
	<img id="img-spinner" src="~/Content/Images/ajax-loader(1).gif" alt="Processing Please Wait" />
</div>


$(document).ajaxStart(function () {
    $(".spinner").show();
});
$(document).ajaxSend(function () {
    $(".spinner").show();
});
$(document).ajaxStop(function () {
    $(".spinner").hide();
});


<div id="spinner" class="spinner" style="display:none;">
	<img id="img-spinner" src="~/Content/Images/ajax-loader(1).gif" alt="Processing Please Wait" />
</div>



this is my layout page coding

$(document).ajaxStart(function () {
    $(".spinner").show();
    
});
$(document).ajaxSend(function () {
    $(".spinner").show();
 
});
$(document).ajaxStop(function () {
    $(".spinner").hide();
});



this is my common.js file coding

spinner is automatically called when ajax starts and automatically stopped when ajax stop their function it's work fine but while running spinner it allow user interface
(e.g)
when user click submit(save) button to save user registration page i load spinner to indicate application working background don't disturb it during this function user interface is in active that is while spinner running user can interact with other functionality.

please anybody give solution to this problem

i do not allow user to interact with UI while spinner running how can i do this please help me

解决方案

(document).ajaxStart(function () {


(".spinner").show(); });


(document).ajaxSend(function () {


这篇关于我在我的Mvc应用程序中有微调器我工作正常但它允许用户界面加载微调器如何解决这个问题我不需要用户界面微调加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆