Hai all...
i have gridview with 1 dropdown list ddl, two texboxes tb1 and tb2.
tb1 is in visible false..
tb2 is in visible true.
if i select dropdown selected value as "other" tb1 column should be visible and ddl selected value not effected to another textbox tb2.
thanks in advance
Lucky LaxmanPosted Mar 11, 2015, 2:11 AM
I'm give you sample code to solve this problem to implement your code following steps .
Step 1 :-
Your Html Code or GridView dropdown list ddl ID I am used Like this ..
Your J query Code follow below
//you can use to J query validation to solve the problem on selected your ddl.
//follow this simple Js Validation.
$(document).ready(function(){
$("#ddl").change(function(){
var SelectedVal=$("#ddl").val();
// there im wrote for selected ddl value with hide and show condition
if(SelectedVal==1)
{
$("#lbl1").show();
$("#lbl2").hide();
$("#tb1").show();
$("#tb2").hide();
}
else if(SelectedVal==2)
{
$("#lbl1").hide();
$("#lbl2").show();
$("#tb1").hide();
$("#tb2").show();
}
else{$("#tb1").show();$("#tb2").show();}
});
});
I this its use full to you. if not you get the you needed result just give me the sample code urs .
You can check this code at following Link : - http://jsfiddle.net/Lucky_/kdbxmbnq/3/
If code is help full Like Me..
Thanks,
Lucky .