I have a .net application that I am trying to add some javascript code
to for a client-side execution. What I want to do is resize all the
HTML text fields on my web form, but instead of writing a line for
each text box I would like to loop through a collection of controls
and resize the control if it is a text field. Is there a way to do
this in javascript? The function below is what I have been toying with
for the past couple of hours. Another idea was to use a css, but I
can't find an element for the text field. Thanks in advance for any
help.
function Test()
{
Tarray = new Object;
Tarray = document.Form1. children
for (var prop in Tarray)
{
//document.writel n(Tarray.toStri ng);
var s;
s = prop
if (Left(s, 3) == "btn")
{
prop.height = "20px";
}
}
}
to for a client-side execution. What I want to do is resize all the
HTML text fields on my web form, but instead of writing a line for
each text box I would like to loop through a collection of controls
and resize the control if it is a text field. Is there a way to do
this in javascript? The function below is what I have been toying with
for the past couple of hours. Another idea was to use a css, but I
can't find an element for the text field. Thanks in advance for any
help.
function Test()
{
Tarray = new Object;
Tarray = document.Form1. children
for (var prop in Tarray)
{
//document.writel n(Tarray.toStri ng);
var s;
s = prop
if (Left(s, 3) == "btn")
{
prop.height = "20px";
}
}
}
Comment