Hi members
I have a TextBox, i want to make it visible if the TextBox="9999"
this is my code
if(ddl.value == 1) //your condition
{
document.getElementById('txt_todate').style.display = 'none';
}
else
{
document.getElementById('txt_todate').style.display = '';
}
and the number from where to test is this :
$(function () {
$("[id*=TextBox4]").autocomplete({
source: function (request, response) {
$.ajax({
type: "POST",
url: '<%=ResolveUrl("~/ArticleInvestigation.aspx/GetNames2") %>',
data: "{ 'prefix': '" + request.term + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
response($.map(data.d, function (item) {
return {
label: item.split('-')[0],
val: item.split('-')[1]
}
}))
},
error: function (response) {
alert(response.responseText);
}
});
},
select: function (e, i) {
$("[id$=hfName]").val(i.item.label);
$.ajax({
type: "POST",
url: '<%=ResolveUrl("~/ArticleInvestigation.aspx/GetCountry2") %>',
data: "{ 'name': '" + i.item.label + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
$("[id*=TextBox3]").val(response.d.split('-')[0]);
$("[id*=TextBox6]").val(response.d.split('-')[1]);
},
error: function (response) {
alert(response.responseText);
}
});
},
minLength: 0
});
});
</script>
i didn't know how i get the value that is passed from autocomplete to the textbox4
please help