Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Calculate length of input based on parent <TD>

Reply
Thread Tools

Calculate length of input based on parent <TD>

 
 
Michael
Guest
Posts: n/a
 
      03-14-2007
Hi. I need dinamically calculate input text field based on parent static TD
before showing content of input. Please, advice.
Michael


 
Reply With Quote
 
 
 
 
Anthony Jones
Guest
Posts: n/a
 
      03-14-2007

"Michael" <(E-Mail Removed)> wrote in message
news:%23$(E-Mail Removed)...
> 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?


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      03-14-2007
Anthony Jones wrote on 14 mrt 2007 in
microsoft.public.inetserver.asp.general:

>
> "Michael" <(E-Mail Removed)> wrote in message
> news:%23$(E-Mail Removed)...
>> 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?


Anyway wrong NG. The problem seems 100% clientside.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
Michael
Guest
Posts: n/a
 
      03-15-2007
' --------------------------------------------------------------------------------------
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "Michael" <(E-Mail Removed)> wrote in message
> news:%23$(E-Mail Removed)...
>> 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?
>
>



 
Reply With Quote
 
Anthony Jones
Guest
Posts: n/a
 
      03-15-2007

"Michael" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>

' --------------------------------------------------------------------------
------------
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >
> > "Michael" <(E-Mail Removed)> wrote in message
> > news:%23$(E-Mail Removed)...
> >> 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?
> >
> >

>
>



 
Reply With Quote
 
Michael
Guest
Posts: n/a
 
      03-15-2007
Thank you very much , Antony. Your answer is great and helpful. Thanks a lot

Michael Groysman

"Anthony Jones" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> "Michael" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>

> ' --------------------------------------------------------------------------
> ------------
>> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >
>> > "Michael" <(E-Mail Removed)> wrote in message
>> > news:%23$(E-Mail Removed)...
>> >> 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?
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If a class Child inherits from Parent, how to implementChild.some_method if Parent.some_method() returns Parent instance ? metal Python 8 10-30-2009 10:31 AM
Calculate length of byte string with embedded nulls Angus C Programming 13 01-05-2007 06:22 AM
Calculate date based on another date + number of minutes Golan C Programming 3 09-15-2006 11:32 PM
Calculate content-length kackson ASP .Net Web Services 3 04-26-2004 08:16 PM
Calculate field based on another field in form jochen scheire Javascript 6 04-22-2004 01:47 PM



Advertisments