从Javascript调用Button单击时更新Progess栏不起作用 [英] Update Progess bar not working when calling Button click from Javascript
问题描述
我在面板中有一个UpdateProgressBar,显示正在加载Image。我正在使用modalPopUp来显示UpdateProgressBar面板。
I have a UpdateProgressBar in a panel, That shows loading Image. I am using modalPopUp to show the UpdateProgressBar panel.
当我点击屏幕上的按钮时工作正常。但是当我调用那个按钮点击javascript时,modalPopUp不显示。下面是我调用按钮点击的代码。
It is working fine when i am clicking button from the screen. But when i am calling that button Click from javascript, modalPopUp doesnot show up. Below is my code to call the button click.
document.getElementById('<%= btnCarrier.ClientID%>')。click();
document.getElementById('<%=btnCarrier.ClientID%>').click();
Rohan Tomar
Rohan Tomar
推荐答案
如果这是一个ASP.Button你可以使用OnClientClick来调用一些javascript函数并做你需要做的事情。例如:
If this is a ASP.Button you can use OnClientClick to call some javascript function and do what you need to do. For example:
OnClientClick="if (validateCPF() != true) {return false;}"
但是如果你使用html输入你可以把你的javascript函数放在onclick方法中,像这样:
But if you using a html input you can put your javascript function inside onclick method, Like this:
<input id="Button2" type="button" value="bla" class="ui-button" onclick="javascript:history.go(-1);" />
但是为了获得更好的支持,请通过 http询问他们://forums.asp.net/ 。
But for a better support , Please ask them at http://forums.asp.net/.
这篇关于从Javascript调用Button单击时更新Progess栏不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!