<script language="javascript" type="text/javascript">
function blockNonNumbers(obj, e, allowDecimal, allowNegative) {var key;
var isCtrl = false;
var keychar;
var reg;
if (window.event) {key = e.keyCode;
isCtrl = window.event.ctrlKey
}
else if (e.which) {key = e.which;
isCtrl = e.ctrlKey;
}
if (isNaN(key)) return true;keychar = String.fromCharCode(key);
// check for backspace or delete, or if Ctrl was pressedif (key == 8 || isCtrl) {
return true;}
reg = /\d/;
var isFirstN = allowNegative ? keychar == '-' && obj.value.indexOf('-') == -1 : false;
var isFirstD = allowDecimal ? keychar == '.' && obj.value.indexOf('.') == -1 : false;
return isFirstN || isFirstD || reg.test(keychar);}
</script>
<div class="floatl width320"><div class=" left_part">effective from:<span class="colorred">*</span></div><div class="right_part"><asp:TextBox ID="txtEffectiveFrom" runat="server" class="textbox"></asp:TextBox><img alt="Calendar" src='<%=Page.ResolveClientUrl("App_Themes/images/meal_booking_datepicker.png") %>'onclick="javascript:displayCalendar(document.getElementById('<%=txtEffectiveFrom.ClientID%>'),'mm/dd/yyyy',this);"id="imgfrom" class="margintop-3" /></div></div>
No comments:
Post a Comment