Click here to Skip to main content
15,870,297 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
JavaScript
 function showCustomer(event) {
document.getElementById('MainContent_hCustomer').value = '';
showPopup('customer', 'MainContent_txtMobile', 'MainContent_hCustomer', document.getElementById('MainContent_txtMobile').value, '', event.keyCode); 
}
 
function showCustomerDtls() {
 
if (document.getElementById('MainContent_hCustomer').value != "") {
$.ajax({
url: '../ajax/ajaxrequest.aspx?ObjectType=custdtls&searchText=' + document.getElementById('MainContent_hCustomer').value,
data: '',
success: function (msg) {//alert(surl1);
var res = msg.split("~~");
document.getElementById('MainContent_txtCustomerName').value = res[0];
document.getElementById('MainContent_txtAddress').value = res[1];
document.getElementById('MainContent_txtMobile').value = res[2];
document.getElementById('MainContent_hCuLedgerId').value = res[3];
funcall();
document.getElementById('MainContent_gSales_tBrand_0').focus();
}
});
}
}


ASP.NET
 <asp:TextBox ID="txtMobile" autocomplete="off" runat="server" onKeyUp="showCustomer(event);" 
class="tAjax" 
onBlur="showCustomerDtls();" 
TabIndex="101" MaxLength="10" ontextchanged="txtMobile_TextChanged">
<input type="hidden" id="hCustomer" runat="server" />
<input type="hidden" id="hCuLedgerId" runat="server" />



When I use postback on this at the time of edit cant select another customer in autocomplete.I want both serverside and above code should to achieve the purpose of getting new data binding to the grid.

I am using all of this Libaries below

JavaScript
 <link href="../../Styles/css/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/js/jquery.min.js" type="text/javascript"></script>
<script src="../../Scripts/js/jquery-ui.min.js" type="text/javascript"></script> 
<script type="text/javascript" src="../../Scripts/js/PopupAutoComplete.js"></script> 
<script src="../../Scripts/js/jquery-1.9.1.js" type="text/javascript"></script>
<%--<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>--%>
<script src="../../Scripts/js/jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript" src="../../Scripts/js/popuplist.js"></script>
<script src="../../Scripts/js/jquery-1.10.2.min.js" type="text/javascript"></script>
Posted
Updated 2-Nov-14 17:24pm
v5
Comments
Laiju k 1-Nov-14 1:09am    
<link href="../../Styles/css/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css"
rel="stylesheet" type="text/css" />
<script src="../../Scripts/js/jquery.min.js" type="text/javascript"></script>
<script src="../../Scripts/js/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../../Scripts/js/PopupAutoComplete.js"></script>
<script src="../../Scripts/js/jquery-1.9.1.js" type="text/javascript"></script>
<%--<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>--%>
<script src="../../Scripts/js/jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript" src="../../Scripts/js/popuplist.js"></script>
<script src="../../Scripts/js/jquery-1.10.2.min.js" type="text/javascript"></script>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900