Hi...
mmmmm try this code...
//where controlName is defined as Control (as parameter)
<script language=""JScript"">
try
{
window.focus();
document.body.focus();
if (document.all(""" & controlName & """).tagName == 'SELECT')
{
document.all(""" & controlName & """).selectedIndex = 0;
document.all(""" & controlName & """).focus();
}
else
{
document.all(""" & controlName & """).select();
document.all(""" & controlName & """).focus();
}
}
catch(e)
{
/**/
}
</script>
regards,
ruel
Hi
Simply i want Hide all Textboxes in a Panel ,,, in asp.net
i can do it by C# :
foreach (Control ctrl in Panel1.Controls)
{
if (ctrl is TextBox)
{
((TextBox)(ctrl)).Visible = false;
}
}
Can anyone tell me how to do in JavaScript?