SetZeroDefault: function (sender, decimal) {
////<summary>function to set default zero </summary>
/// <param name="sender" type="Object">
/// Determines the Textbox
/// </param>
/// <param name="decimal" type="integer">
/// Determines the no. of decimal points
/// </param>
if ($(sender).val() == "") {
if (!decimal)
$(sender).val("0");
else {
switch (decimal) {
case 0:
$(sender).val("0");
break;
case 1:
$(sender).val("0.0");
break;
case 2:
$(sender).val("0.00");
break;
case 3:
$(sender).val("0.000");
break;
}
}
}
}
////<summary>function to set default zero </summary>
/// <param name="sender" type="Object">
/// Determines the Textbox
/// </param>
/// <param name="decimal" type="integer">
/// Determines the no. of decimal points
/// </param>
if ($(sender).val() == "") {
if (!decimal)
$(sender).val("0");
else {
switch (decimal) {
case 0:
$(sender).val("0");
break;
case 1:
$(sender).val("0.0");
break;
case 2:
$(sender).val("0.00");
break;
case 3:
$(sender).val("0.000");
break;
}
}
}
}
No comments:
Post a Comment