how ca I use textbox in table

Discussion in 'Javascript' started by Sudhanshu, Apr 2, 2010.

  1. Sudhanshu

    Sudhanshu Guest

    I'm not able to use the values of text boxes. can anyone help me to do
    so.

    thank u.

    <body text=white>
    <form name="frm1">
    <h3>Mathematical Operations<h3>
    <table border=2 bgcolor=black cellpadding=10 name="tbl">
    <tr><td>
    Number 1:<input type="text" name="num1"width=15>
    <br>
    Number 2:<input type="text" name="num2" width=15>
    </td></tr><tr><td>
    Operator :
    <input type="button" name=pls value=" + "
    OnClick="calc("+",frm1)">
    <input type="button" name=mns value=" - "
    OnClick="calc("-",frm1)">
    <input type="button" name=mul value=" X "
    OnClick="calc("*",frm1)">
    <input type="button" name=dvv value=" / "
    OnClick="calc("/",frm1)">
    </td></tr><tr><td>

    Answer :<input type="text" name="ans" width=15>
    </td>
    </tr>
    </table>
    </form>

    </body>
    Sudhanshu, Apr 2, 2010
    #1
    1. Advertising

  2. Sudhanshu

    Sean Kinsey Guest

    On Apr 2, 7:25 pm, Sudhanshu <> wrote:
    > I'm not able to use the values of text boxes. can anyone help me to do
    > so.


    First of all, start with validating the HTML with eg http://validator.w3.org/

    >
    > thank u.
    >
    > <body text=white>


    See http://www.w3.org/TR/html401/struct/global.html#h-7.5.1
    The text attribute is deprecated.

    >         <form name="frm1">
    >         <h3>Mathematical Operations<h3>
    >         <table border=2 bgcolor=black cellpadding=10 name="tbl">
    >         <tr><td>
    >         Number  1:<input type="text" name="num1"width=15>


    Missing space

    >         <br>
    >         Number  2:<input type="text" name="num2" width=15>
    >         </td></tr><tr><td>
    >         Operator :
    >         <input type="button" name=pls value="   +   "
    > OnClick="calc("+",frm1)">


    The same quote mark used both around and in the attribute value of
    OnClick, replace with eg. "calc('+',frm1)"
    Sean Kinsey, Apr 2, 2010
    #2
    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. S. Justin Gengo
    Replies:
    0
    Views:
    500
    S. Justin Gengo
    Jul 16, 2003
  2. Hazzard
    Replies:
    2
    Views:
    532
    Yan-Hong Huang[MSFT]
    Jul 23, 2003
  3. David Williams
    Replies:
    2
    Views:
    1,108
    Jacob Yang [MSFT]
    Aug 12, 2003
  4. Ken Dopierala Jr.

    Do you use <table> or <asp:Table>?

    Ken Dopierala Jr., Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    8,603
    Craig Deelsnyder
    Jan 13, 2004
  5. Rio
    Replies:
    4
    Views:
    1,174
Loading...

Share This Page