Hi
I have a textbox with name
txt1.
In javascript, I am making
txt1 mandatory, but now I have a added dropdownlist.
So, now
txt1 is mandatory only when, the specific value of dropdown is selected.
That means, when I select
name from dropdown, then
txt1 is mandatory and when I select
class from dropdown the
txt1 should set to visible off.
Now I make
txt1 visible to false, when i select
class in dropdown, but it is throwing
javascript error that
txt1 is null in following line.
But when I select
name from dropdown then no error comes because it is visible.
if(document.getElementById('<%=Txt1.ClientID%>').value=="")