Calculate length of input based on parent <TD>

M

Michael

Hi. I need dinamically calculate input text field based on parent static TD
before showing content of input. Please, advice.
Michael
 
A

Anthony Jones

Michael said:
Hi. I need dinamically calculate input text field based on parent static TD
before showing content of input. Please, advice.
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?
 
E

Evertjan.

Anthony Jones wrote on 14 mrt 2007 in
microsoft.public.inetserver.asp.general:
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.
 
M

Michael

' --------------------------------------------------------------------------------------
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

' --------------------------------------------------------------------------------------
 
A

Anthony Jones

' --------------------------------------------------------------------------
------------
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.

' --------------------------------------------------------------------------
------------
 
M

Michael

Thank you very much , Antony. Your answer is great and helpful. Thanks a lot

Michael Groysman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top