i am using BalloonPopupExtender to show that caps lock is on or off at keypress event only .but popup gets displayed,whenever I click in text box ,which I dont want.I set displayonclick property to false,but its not working,why??is there any other way to hide it during click event??although java script in keypress event i working fine.I am using vb.net 2010.
kindly help
thank you
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script language="javascript" type="text/javascript">
function capLock(e) {
kc = e.keyCode ? e.keyCode : e.which;
sk = e.shiftKey ? e.shiftKey : ((kc == 16) ? true : false);
var ctrl = $find('txtPassword_BalloonPopupExtender');
if (((kc >= 65 && kc <= 90) && !sk) || ((kc >= 97 && kc <= 122) && sk)) {
ctrl.showPopup();
// document.getElementById('Panel1').style.visibility = 'visible';
else {
ctrl.hidePopup();
}
//
//} document.getElementById('Panel1').style.visibility = 'hidden';
}
</script>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager3" runat="server">
</asp:ScriptManager>
<div id="divMayus" style="visibility:hidden">
<asp:Label ID="Label1" runat="server" Text="Caps Lock is On.!"></asp:Label>
</div>
<div>
<asp:Panel runat="server" ID="Panel1">
<b>caps on</b>
</asp:Panel>
<asp:TextBox ID="txtPassword" runat="server"
onmouseover="$find(this).hidePopup();" onmouseout="$find(this).hidePopup();"
onClick="$find(this).hidePopup();" TextMode="Password" onkeypress="capLock(event)">
</asp:TextBox>
<asp:BalloonPopupExtender ID="txtPassword_BalloonPopupExtender"
runat="server" CustomCssUrl="" DynamicServicePath="" Enabled="True" BalloonPopupControlID="Panel1"
ExtenderControlID="" TargetControlID="txtPassword" DisplayOnClick="false">
</asp:BalloonPopupExtender>
</div>
</form>
</body>