• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

Rows and columns in text box??

How do i make columns and rows to appear in a text box?? For eg in a simple text box as shown below  I want 3 rows and  3 columns to be seen. How do I do this? Thank you.

A

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>

<body>

<form method="POST">
  <p align="center"><input type="text" name="T1" size="20"></p>
</form>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>

</body>

</html>
0
aej1973
Asked:
aej1973
1 Solution
 
Irwin SantosComputer Integration SpecialistCommented:
<table width="100%"  border="0" cellspacing="5" cellpadding="5">
  <tr>
    <td>r1c1</td>
    <td>r1c2</td>
    <td>r1c3</td>
  </tr>
  <tr>
    <td>r2c1</td>
    <td>r2c2</td>
    <td>r2c3</td>
  </tr>
  <tr>
    <td>r3c1</td>
    <td>r3c2</td>
    <td>r3c3</td>
  </tr>
</table>
0
 
aej1973Author Commented:
Thank you for the answer. I am looking for the table inside the text area box. Now I am getting the rows and columns only in the form.

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<form method="POST">
  <p align="center"><input type="text" name="T1" size="20"><table width="100%"  border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
  <tr>
    <td align="center" style="border-style: solid; border-width: 1">r1c1</td>
    <td align="center" style="border-style: solid; border-width: 1">r1c2</td>
    <td align="center" style="border-style: solid; border-width: 1">r1c3</td>
  </tr>
  <tr>
    <td align="center" style="border-style: solid; border-width: 1">r2c1</td>
    <td align="center" style="border-style: solid; border-width: 1">r2c2</td>
    <td align="center" style="border-style: solid; border-width: 1">r2c3</td>
  </tr>
  <tr>
    <td align="center" style="border-style: solid; border-width: 1">r3c1</td>
    <td align="center" style="border-style: solid; border-width: 1">r3c2</td>
    <td align="center" style="border-style: solid; border-width: 1">r3c3</td>
  </tr>
</table></p>
</form>

</body>

</html>
0
 
smaccariCommented:
An input type=text has only one row.
If you need a multiple row/multiple columns input, use a <textarea>.

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
sam85281Commented:
You can't display anything but text in an input or textarea.  No tables, images, etc. ONLY TEXT.

-Sam
0
 
aej1973Author Commented:
Thanks, Sam.
0
 
nifmcmCommented:
you could place your table in a div and set contentEditable="true" on the div. e.g.

<div contentEditable="true" id="myTextArea" name="myTextArea">
      <table width="100%"  border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
            <tr>
                  <td align="center" style="border-style: solid; border-width: 1">r1c1</td>
                  <td align="center" style="border-style: solid; border-width: 1">r1c2</td>
                  <td align="center" style="border-style: solid; border-width: 1">r1c3</td>
            </tr>
            <tr>
                  <td align="center" style="border-style: solid; border-width: 1">r2c1</td>
                  <td align="center" style="border-style: solid; border-width: 1">r2c2</td>
                  <td align="center" style="border-style: solid; border-width: 1">r2c3</td>
            </tr>
            <tr>
                  <td align="center" style="border-style: solid; border-width: 1">r3c1</td>
                  <td align="center" style="border-style: solid; border-width: 1">r3c2</td>
                  <td align="center" style="border-style: solid; border-width: 1">r3c3</td>
            </tr>
      </table>
</div>

you'll need to set a hidden input field's value in your form to the innerHTML of the div on submit of your form in order for you to access the data on your action page.

but, this'll only work in IE.

if it needs to work in firefox and other browsers, you might want to look into getting hold of a wysiwyg kind of editor as the code gets fairly involved and you need iframes and designMode. there are plenty of wysiwyg editors out there. try this url:

http://www.htmlarea.com/directory/Web_Software_Components/WYSIWYG_Editors/index.html
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now