Hi sam, user have no idea what is enter in textbox, suppose user enter the some white space your condition is false. I think this a not a good idea for validate the value and one more thing i can't understand what you want disabled or hide the textbox and another control. checked like this
Remove the white space in jquery, try this code $.trim(control id) Enable or Disabled control if($('#txtfrom2').val()!='null'||$('#txtform2').val()!='') { ValidatorEnable('<%=yourControlName.ClientID %>',false);
} else
{ ValidatorEnable('<%=yourControlName.ClientID %>',false);} Hide and unhide control in jquery if($.trim($('#txtfrom2').val())!='null'||$.trim($('#txtform2').val())!='') { $('#controlId').hide();
Joginder BangerPosted Mar 28, 2015, 4:22 PM
user have no idea what is enter in textbox, suppose user enter the some white space your condition is false. I think this a not a good idea for validate the value and one more thing i can't understand what you want disabled or hide the textbox and another control. checked like this
Remove the white space in jquery, try this code
$.trim(control id)
Enable or Disabled control
if($('#txtfrom2').val()!='null'||$('#txtform2').val()!='')
{
ValidatorEnable('<%=yourControlName.ClientID %>', false);
}
else
{
ValidatorEnable('<%=yourControlName.ClientID %>', false);}
Hide and unhide control in jquery
if($.trim($('#txtfrom2').val())!='null'||$.trim($('#txtform2').val())!='')
{
$('#controlId').hide();
}
else
{
$('#controlId').show();
}
*jsb
Abhijeet SinghPosted Mar 28, 2015, 3:31 PM
http://www.techtamasha.com/disablereadonly-and-enable-textbox-using-javascript/34
Guest UserPosted Oct 27, 2014, 5:10 AM
document.getElementById("Rftxtfrom2").disabled = true;