<asp:TextBox ID="txtDrg" onkeypress="SearchText('DRG',this,event);" runat="server" ></asp:TextBox> function SearchText(searchType, searchKey, event) { if (searchType != '' && searchKey != '') { var x = event.which || event.keyCode; var searchKeyWord = ''; if (searchType == 'DRG') { if (x == 8 || x == 46) { if (searchKey.value.length > 0) { searchKeyWord = searchKey.value.toString().slice(0, -1); } } else { if (x == 110 || x == 190) searchKeyWord = '.'; else searchKeyWord = String.fromCharCode(x); if (searchKey.value != '' || searchKey.value != undefined) searchKeyWord = searchKey.value + searchKeyWord; } if (valiadte) GetAutoData(searchType, searchKeyWord); } } } function GetAutoData() { //code }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)