ASP.NET waitCursor更改为DropDownList [英] ASP.NET waitCursor changes over DropDownList
问题描述
我希望页面执行回发时将光标更改为waitcursor.
我将javascript函数放在-Section中:
Hi,
I want the cursor to change to waitcursor while my page is doing postback.
I put the javascript function in -Section :
function setHourglass()
{
document.body.style.cursor = ''wait'';
}
并在Form-Tag中:
and in Form-Tag:
<form id="form1" runat="server" onsubmit="return PleaseWait();"></form>
但是它可以正常工作:如果光标在DropDownList上,它会变回正常状态.从DropDownList移开后,它将更改回waitcursor,直到完成回发.
在我的应用程序中,我有几个依赖的dropdownfields,每个都具有autopostback = true.我希望用户在第一个DropDownList完成自动回发之前不要从以下DropDownList中进行选择.但是用户会自动将鼠标移到下面的DropDownList上,然后光标不再是waitCursor.
我该怎么办?
It works fine BUT: if the cursor is over a DropDownList it changes back to normal. Moving away from the DropDownList it changes back to waitcursor until postback is done.
In my application I have several depending dropdownfields each with autopostback=true. I want the user not to select from the following DropDownList before the first DropDownList has finished autopostback. But the user automatically moves the mouse over the following DropDownList - and the cursor is then not a waitCursor.
What can I do?
推荐答案
不要依靠光标来阻止用户单击您不希望其单击的位置.禁用从属下拉菜单,直到做出正确的选择为止.我会使用AJAX来完成此任务,而不是依靠回发
Don''t rely on the cursor to stop a user from clicking where you don''t want them to. Disable the dependent dropdowns until the proper selections have been made. I would use AJAX to accomplish this rather than relying on postbacks
这篇关于ASP.NET waitCursor更改为DropDownList的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!