进度条使用gif图像直到下一个面板打开。 [英] Progress bar usign gif image untill next panel opens.

查看:110
本文介绍了进度条使用gif图像直到下一个面板打开。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想以图片的形式创建进度条。

当我通过我的应用程序发送邮件时,在发送和响应时间之间我必须显示一个GIF。显示过程正在进行的图像。



任何人都可以建议我演示或教程。



Thanx in Advance。

解决方案

根据您的网页编码方式实现此更改的逻辑。



选项1)如果您的网页在发送电子邮件后得到刷新

在这种情况下,只需打开一个加载了gif的JQuery弹出/模型对话框窗口。这将保持可见,直到收到响应并刷新页面。 (所以,好处是没有明确需要隐藏进度条)



选项2)如果您使用AJAX调用发送电子邮件(处理等) ..)

在这种情况下逻辑仍然相同。单击发送邮件按钮,打开弹出/模型对话框并等待直到收到响应。收到后,关闭弹出/模型对话窗口。



希望它能让您了解如何实现自己的进度条!!!



问候,

Niral Soni


 < ;   style     type  < span class =code-keyword> =  text / css >  
.modalPopup
{
background-color:#696969;
filter:alpha(opacity = 40);
不透明度:0.7;
xindex:-1;
}
< / style >





 <  表格    id   =  form1    runat   =  server >  
< asp:ScriptManager ID = ScriptManager1 runat = 服务器 / >

< script 类型 = text / javascript >
var prm = Sys.WebForms.PageRequestManager.getInstance();
//在处理异步回发开始之前引发并将回发请求发送到服务器。
prm.add_beginRequest(BeginRequestHandler);
//异步回发完成并且控件返回浏览器后引发。

prm.add_endRequest(EndRequestHandler);
函数BeginRequestHandler(sender,args){
//显示模态弹出窗口 - 更新进度
var popup =


find('<% = modalPopup.ClientID %> ');
if(popup!= null){
popup.show();
}
}

函数EndRequestHandler(sender,args){
//隐藏模态弹出窗口 - 更新进度
var popup =

Hi,
I want to create progress bar in the form of image.
When i am sending mail through my application then the in between sending and responding time i have to show one gif. image which shows process is going on.

Can anyone suggest me demo or tutorial for this.

Thanx in Advance.

解决方案

Logic for implementing this changes based on how your web page is coded.

Option 1) If your web page is getting refreshed after sending the email
In this case, simply open a JQuery popup/model dialog window with your gif loaded in it. This will remain visible until response is received and page is refreshed. (So, benefit is there is no explicit need to hide the progress bar)

Option 2) If you are using AJAX call for sending email (processing etc..)
In this case the logic is still same. On click of send mail button, open the popup/model dialog and wait until you receive a response. Once received, close the popup/model dialog window.

Hope it gives you an idea of implementing your own progress bar !!!

Regards,
Niral Soni


<style type="text/css">
.modalPopup
{
background-color: #696969;
filter: alpha(opacity=40);
opacity: 0.7;
xindex:-1;
}
</style>



<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"/>

<script type="text/javascript">
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    //Raised before processing of an asynchronous postback starts and the postback request is sent to the server.
    prm.add_beginRequest(BeginRequestHandler);
    // Raised after an asynchronous postback is finished and control has been returned to the browser.

    prm.add_endRequest(EndRequestHandler);
    function BeginRequestHandler(sender, args) {
        //Shows the modal popup - the update progress
        var popup =


find('<%= modalPopup.ClientID %>'); if (popup != null) { popup.show(); } } function EndRequestHandler(sender, args) { //Hide the modal popup - the update progress var popup =


这篇关于进度条使用gif图像直到下一个面板打开。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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