Calculate length of input based on parent <TD>

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

  1. Michael

    Michael Guest

    Hi. I need dinamically calculate input text field based on parent static TD
    before showing content of input. Please, advice.
    Michael
     
    Michael, Mar 14, 2007
    #1
    1. Advertising

  2. "Michael" <> wrote in message
    news:%23$...
    > 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?
     
    Anthony Jones, Mar 14, 2007
    #2
    1. Advertising

  3. Michael

    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
    >> 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)
     
    Evertjan., Mar 14, 2007
    #3
  4. Michael

    Michael Guest

    ' --------------------------------------------------------------------------------------
    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
    >> 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?
    >
    >
     
    Michael, Mar 15, 2007
    #4
  5. "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
    > >> 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?
    > >
    > >

    >
    >
     
    Anthony Jones, Mar 15, 2007
    #5
  6. Michael

    Michael Guest

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

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

    >>
    >>

    >
    >
     
    Michael, Mar 15, 2007
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Golan
    Replies:
    3
    Views:
    373
  2. Angus
    Replies:
    13
    Views:
    693
    CBFalconer
    Jan 5, 2007
  3. kackson

    Calculate content-length

    kackson, Apr 26, 2004, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    312
    Jan Tielens
    Apr 26, 2004
  4. jochen scheire

    Calculate field based on another field in form

    jochen scheire, Apr 21, 2004, in forum: Javascript
    Replies:
    6
    Views:
    202
    Mick White
    Apr 22, 2004
  5. pmarisole
    Replies:
    0
    Views:
    177
    pmarisole
    Apr 29, 2008
Loading...

Share This Page