Click to See Complete Forum and Search --> : space


franches
11-01-2004, 11:57 PM
hi,
i have a problem on my listbox/select box. i am displaying data from my table in a database(with only selected fields) in my listbox. my problem now is i need to put spaces between them inorder for it to look just like in a table(with columns). my form looks like this

ID******Date******Project Code*******Map Number
//listbox here and the data ID should fall on ID column and the Date should fall on the Date column

this is a part of my code which displays the data
<p><select class=select size="120" name="VwRc" >
<? while ($rsTable=mysql_fetch_array($rs))
echo "<option>".$rsTable['ActId'],$rsTable['ActDate']; ?>

</select>

Webskater
11-02-2004, 07:46 AM
I would have thought that using a monospaced font and calculating how many characters are in each column (in each row) you could calculate how many spaces you have to insert between each column in each row.
Might be easier to put 4 select boxes next to each other, populate each one with one column and use javascript so that when any one is selected the others all move to show the correct row.

7stud
11-02-2004, 07:51 AM
Why not use an html table with the table headers across the top of the table and the listboxes in the <td>'s?

franches
11-03-2004, 06:12 PM
Actually, I was trying to rewrite this code into php. I also tried the online converter but can't get it to work. I hope someone could help me with this. Thank you very much in advance.

I've attached the code.

senshi
11-04-2004, 01:53 AM
you need to pack out the table with whitespace characters, I have seen pages tabulated using the '&nbsp' non breaking space character in HTML, so I cant see any reason you couldnt do the same within a textarea, alternative is to build a dynamic table and populate it with the data your trying to format in place of using a text area.