# Calculate length of input based on parent <TD>

Discussion in 'ASP General' started by Michael, Mar 14, 2007.

1. ### MichaelGuest

Hi. I need dinamically calculate input text field based on parent static TD
Michael

Michael, Mar 14, 2007

2. ### Anthony JonesGuest

"Michael" <> wrote in message
news:%23\$...
> Hi. I need dinamically calculate input text field based on parent static

TD
> Michael
>
>

In what way is the TD 'static'?
What units do you want the length value to be in?

It usually best to describe your intentions along with your question. That
way you stand a better chance of someone giving an better approach overall
to your problem. So why to do you want to calculate the length and what
exactly do you mean by length anyway?

Anthony Jones, Mar 14, 2007

3. ### Evertjan.Guest

Anthony Jones wrote on 14 mrt 2007 in
microsoft.public.inetserver.asp.general:

>
> "Michael" <> wrote in message
> news:%23\$...
>> Hi. I need dinamically calculate input text field based on parent
>> static

> TD
>> Michael
>>
>>

>
> In what way is the TD 'static'?
> What units do you want the length value to be in?
>
> It usually best to describe your intentions along with your question.
> That way you stand a better chance of someone giving an better
> approach overall to your problem. So why to do you want to calculate
> the length and what exactly do you mean by length anyway?

Anyway wrong NG. The problem seems 100% clientside.

--
Evertjan.
The Netherlands.

Evertjan., Mar 14, 2007
4. ### MichaelGuest

' --------------------------------------------------------------------------------------
The sample here:

<td width="250">
<input type=text size=115 value=Rs("ItemName")>
</td>
<td width="100">
<input type=text size=50 value=Rs("ItemType")>
</td>

Every time i have different amount of <TD>s for display and every time i
make first width of TD and after accordingly size of input. I would like to
calculate dinamicaly size of <input> based on width of parent <TD>
Thanks for respond

' --------------------------------------------------------------------------------------

"Anthony Jones" <> wrote in message
news:...
>
> "Michael" <> wrote in message
> news:%23\$...
>> Hi. I need dinamically calculate input text field based on parent static

> TD
>> Michael
>>
>>

>
> In what way is the TD 'static'?
> What units do you want the length value to be in?
>
> It usually best to describe your intentions along with your question.
> That
> way you stand a better chance of someone giving an better approach overall
> to your problem. So why to do you want to calculate the length and what
> exactly do you mean by length anyway?
>
>

Michael, Mar 15, 2007
5. ### Anthony JonesGuest

"Michael" <> wrote in message
news:...
>

' --------------------------------------------------------------------------
------------
> The sample here:
>
> <td width="250">
> <input type=text size=115 value=Rs("ItemName")>
> </td>
> <td width="100">
> <input type=text size=50 value=Rs("ItemType")>
> </td>
>
> Every time i have different amount of <TD>s for display and every time i
> make first width of TD and after accordingly size of input. I would like

to
> calculate dinamicaly size of <input> based on width of parent <TD>
> Thanks for respond

Don't use size attribute (in fact don't use width attribute either)

<table style="table-layout:fixed">
<tr>
<td style="width:250px">
<input type=text style="width:100%" value=Rs("ItemName")>
</td>
<td style-"width:100px">
<input type=text style="width:100%" value=Rs("ItemType")>
</td>
</tr>
</table>

table-layout:fixed indicates that your TD widths should be honored. The
input widths of 100% indicate that it should take up all the available space
within the TD.

>
>

' --------------------------------------------------------------------------
------------
>
> "Anthony Jones" <> wrote in message
> news:...
> >
> > "Michael" <> wrote in message
> > news:%23\$...
> >> Hi. I need dinamically calculate input text field based on parent

static
> > TD
> >> Michael
> >>
> >>

> >
> > In what way is the TD 'static'?
> > What units do you want the length value to be in?
> >
> > It usually best to describe your intentions along with your question.
> > That
> > way you stand a better chance of someone giving an better approach

overall
> > to your problem. So why to do you want to calculate the length and

what
> > exactly do you mean by length anyway?
> >
> >

>
>

Anthony Jones, Mar 15, 2007
6. ### MichaelGuest

Michael Groysman

"Anthony Jones" <> wrote in message
news:%...
>
> "Michael" <> wrote in message
> news:...
>>

> ' --------------------------------------------------------------------------
> ------------
>> The sample here:
>>
>> <td width="250">
>> <input type=text size=115 value=Rs("ItemName")>
>> </td>
>> <td width="100">
>> <input type=text size=50 value=Rs("ItemType")>
>> </td>
>>
>> Every time i have different amount of <TD>s for display and every time i
>> make first width of TD and after accordingly size of input. I would like

> to
>> calculate dinamicaly size of <input> based on width of parent <TD>
>> Thanks for respond

>
> Don't use size attribute (in fact don't use width attribute either)
>
> <table style="table-layout:fixed">
> <tr>
> <td style="width:250px">
> <input type=text style="width:100%" value=Rs("ItemName")>
> </td>
> <td style-"width:100px">
> <input type=text style="width:100%" value=Rs("ItemType")>
> </td>
> </tr>
> </table>
>
> table-layout:fixed indicates that your TD widths should be honored. The
> input widths of 100% indicate that it should take up all the available
> space
> within the TD.
>
>
>>
>>

> ' --------------------------------------------------------------------------
> ------------
>>
>> "Anthony Jones" <> wrote in message
>> news:...
>> >
>> > "Michael" <> wrote in message
>> > news:%23\$...
>> >> Hi. I need dinamically calculate input text field based on parent

> static
>> > TD
>> >> Michael
>> >>
>> >>
>> >
>> > In what way is the TD 'static'?
>> > What units do you want the length value to be in?
>> >
>> > It usually best to describe your intentions along with your question.
>> > That
>> > way you stand a better chance of someone giving an better approach

> overall
>> > to your problem. So why to do you want to calculate the length and

> what
>> > exactly do you mean by length anyway?
>> >
>> >

>>
>>

>
>

Michael, Mar 15, 2007