我如何能够创建一个进度条,它出现在更新面板内的radiobuttonlist的选定索引上 [英] How I am able to create a progress bar which appears on selected index changed of radiobuttonlist inside a update panel

查看:71
本文介绍了我如何能够创建一个进度条,它出现在更新面板内的radiobuttonlist的选定索引上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

我如何能够创建一个进度条,该进度条出现在asp.net的更新面板中的radiobuttonlist的选定索引更改



i到目前为止已完成此操作,但在我更改所选的radiobutton索引时进度无效



- javascript -



< script type =text / javascript>

函数ShowProgress(){

setTimeout(function(){

var modal = $('');

modal.addClass(modal);

$('form')。append(modal);

var loading = $(。loading);

loading.show();



var top = Math.max($(window).height()/ 2 - loading [0] .offsetHeight / 2,0;)

var left = Math.max($(window).width()/ 2 - loading [0] .offsetWidth / 2,0;)

loading.css({top:top,left : 剩下 }) ;

},200);

}

$('form')。live(submit,function(){

ShowProgress();



});

< / script>



 



< asp:UpdatePanel ID =UpdatePanel1runat =server >

< contenttemplate>

< asp:RadioButtonList ID =RadioButtonList1runat =serverAutoPostBack =TrueClientIDMode =AutoID

onselectedindexchanged =RadioButtonList1_SelectedIndexChanged

RepeatDirection =Horizo​​ntal>

< asp:ListItem Value =0Selected =True>客户

< asp:ListItem Value =1>产品



< span class =loadingalign =center >

< p style =margin-removed-1200px; margin-removed350px>正在加载。请稍候。< / p>





< img style =display:block; margin-左:623px;高度:100像素;宽度:100像素; margin-top:-10pxsrc =../ Images / loader.gifalt =/>

< / span>

< / contenttemplate>



< triggers>

< asp:AsyncPostBackTrigger ControlID =RadioButtonList1EventName =selectedindexchanged/>

< /触发器>

< / UpdatePanel>





protected void RadioButtonList1_SelectedIndexChanged(object sender,EventArgs e)

{

string script =$(document).ready(function(){$('[id * = RadioButtonList1]' ).click();});;

ClientScript.RegisterStartupScript(this.GetType(),load,script,true);

}

解决方案

('');

modal.addClass(modal);

('form')。append(modal);

var loading =


(。loading);

loading.show();



var top = Math.max(


How I am able to create a progress bar which appears on selected index changed of radiobuttonlist inside a update panel in asp.net

i have done this so far but progress is not working while i am changing the selected index of radiobutton

--javascript--

<script type="text/javascript">
function ShowProgress() {
setTimeout(function () {
var modal = $('');
modal.addClass("modal");
$('form').append(modal);
var loading = $(".loading");
loading.show();

var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
loading.css({ top: top, left: left });
}, 200);
}
$('form').live("submit", function () {
ShowProgress();

});
</script>


<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" ClientIDMode="AutoID"
onselectedindexchanged="RadioButtonList1_SelectedIndexChanged"
RepeatDirection="Horizontal">
<asp:ListItem Value="0" Selected="True">Customers
<asp:ListItem Value="1">Product

<span class="loading" align="center">
<p style="margin-removed-1200px; margin-removed350px">Loading. Please wait.</p>



<img style="display: block;margin-left:623px;height:100px; width:100px; margin-top:-10px" src="../Images/loader.gif" alt="" />
</span>
</contenttemplate>

<triggers>
<asp:AsyncPostBackTrigger ControlID="RadioButtonList1" EventName="selectedindexchanged"/>
</triggers>
</UpdatePanel>


protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
string script = "$(document).ready(function () { $('[id*=RadioButtonList1]').click(); });";
ClientScript.RegisterStartupScript(this.GetType(), "load", script, true);
}

解决方案

('');
modal.addClass("modal");


('form').append(modal);
var loading =


(".loading");
loading.show();

var top = Math.max(


这篇关于我如何能够创建一个进度条,它出现在更新面板内的radiobuttonlist的选定索引上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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