TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ashok kumar
NA
89
36.1k
Zero alone is missing in paramter list when call webservice
Oct 21 2013 7:27 AM
Hi,
My Problem looks really strange,iam calling an Autocomplete.asmx Web method from jquery.first time the first parameter 0 is passing the second time the Zer0 is geting diappeared,instead of 0 if any other numbers are there they are getting displayed.
Aspx:
function SearchText() {
$('#<%=txtphoneno.ClientID%>').autocomplete({
source: function (request, response) {
Search();
}
});
}
//-->loadtop 5 jobs
function Search() {
var callid = $('#<%= txtphoneno.ClientID%>').val().toString();
// alert(callid);
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "../HttpHandler/Autocomplete.asmx/GetCallername",
data: "{'callerid':" + callid + "}",
dataType: "json",
success: function (data) {
//response(data.d);
// alert(data.d);
$('#<%=txtname .ClientID %>').removeClass('text-label');
$('#<%=txtname .ClientID %>').addClass('lbls');
$('#<%=txtnote .ClientID %>').removeClass('text-label');
$('#<%=txtnote .ClientID %>').addClass('lbls');
document.getElementById('<%=txtname .ClientID %>').value = data.d[0];
document.getElementById('<%=txtnote .ClientID %>').value = data.d[1];
if (data.d != 'User Doesnt Exist') {
var param = $('#<%= txtphoneno.ClientID%>').val();
$("#<%=IframeJobHistory.ClientID%>").show();
LoadHistoryDetails(param);
}
else {
// $("#<%=IframeJobHistory.ClientID%>").hide();
}
},
error: function (result) {
// alert("Error");
}
});
}
CS Code AutoComplete.Asmx
[WebMethod ]
public string [] GetCallername(String callerid)
{
..............................
return CallerDetails;
}
}
In the String callerid, first time when the user enters 0 iam getting 0 ,second time when the user enters any number iam getting the number but the Zero disappears.
If i use any other number,apart from zero things are working fine. Pls help me out.
Reply
Answers (
0
)
how to append a Div with side down...
Jquery not working in User Control