Author |
Topic  |
|
kolucoms6
Average Member
  
845 Posts |
Posted - 13 April 2007 : 14:41:05
|
Here it goes :
<table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
It looks in a browser:
row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2
Now , I want the same exactly but, I want to display and write the content in below fashion.
1)row 1, cell 1 2)row 2, cell 1 3)row 1, cell 2 4)row 2, cell 2
Any Help ? |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 13 April 2007 : 15:00:56
|
what ? |
 |
|
kolucoms6
Average Member
  
845 Posts |
Posted - 13 April 2007 : 15:09:51
|
Ahh Did I confuse you ??
Oppss Sorry.. Let me explain again
First I want to write content of
row 1, cell 1 , then row 2, cell 1 , then row 1, cell 2 , then row 2, cell 2
Instead of
row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2
All these contents are dynamically written (database driven)
Basically write first columns first and then second column content... |
Edited by - kolucoms6 on 13 April 2007 15:10:39 |
 |
|
JJenson
Advanced Member
    
USA
2121 Posts |
Posted - 13 April 2007 : 16:41:59
|
All you have to do is on the tag do something like this.
<tr>
<td>Cell 1</td>
</tr>
<tr>
<td>Cell 2</td>
</tr>
<tr>
<td>Cell 3</td>
</tr>
<tr>
<td>Cell 4</td>
</tr>
I believe this is what you were looking for? |
Edited by - JJenson on 13 April 2007 16:42:48 |
 |
|
kolucoms6
Average Member
  
845 Posts |
Posted - 13 April 2007 : 16:49:29
|
What my idea is :
I will run a loop in a recordset and fill up rowwise FIRST colunm all data.Means row 1, cell 1 | row 2, cell 1 | row 3, cell 1 etc
The I will again loop through another recordset and fill up rowwise SECOND colunm all data.Means row 1, cell 2 | row 2, cell 2 | row 3, cell 2 etc |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 13 April 2007 : 17:18:45
|
Might help things if you thought of it less in terms of the final display (the table code, etc.) and more in terms of the data and how it's contained in your recordset... I have a funny feeling that if you frame the question right you'll find the answer.  |
 |
|
kolucoms6
Average Member
  
845 Posts |
Posted - 13 April 2007 : 17:26:02
|
May be You are right.. But I am not a ASP/HTML developer.
Just trying out things... Any example code will definitely help..
|
 |
|
Roger Fredriksson
Average Member
  
Sweden
556 Posts |
Posted - 14 April 2007 : 05:11:49
|
Create the recordset and populate an array shuld do the trick would it not? |
rf/www.avgifter.com |
 |
|
kolucoms6
Average Member
  
845 Posts |
Posted - 14 April 2007 : 05:58:45
|
Array.. oh Ok...
No other simple way ? :-) |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 14 April 2007 : 06:30:34
|
quote: Originally posted by kolucoms6
Array.. oh Ok...
No other simple way ? :-)
No, an array would be the simplest, quickest and most efficient way to do it. |
 |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 14 April 2007 : 09:28:53
|
Look at basic HTML as a page of text written from top to bottom, left to right, so you have to fill tables a cell at a time, a row at a time.
There are other options, but only if you're using tableing components or .NET, so the array is your only way to go now, unless you are just doing a big 2-col layout where you don't require the 2 columns to line up. If that's the case, you can create a big 2-cell table then separate tables within each cell, if you see what I mean...
<table> <tr> <td> <table> <tr> <td>Col1row1</td> </tr> <tr> <td>col1row2</td> </tr> <tr> <td>col1row3</td> </tr> <tr> <td>col1row4</td> </tr> </table> </td> <td> <table> <tr> <td>col2row1</td> </tr> <tr> <td>col2row2</td> </tr> <tr> <td>col2row3</td> </tr> <tr> <td>col2row4</td> </tr> </table> </td> </tr> </table>
But expect the 2 sides to not line up :-( hth
|
 |
|
kolucoms6
Average Member
  
845 Posts |
Posted - 14 April 2007 : 11:59:49
|
Great... and Now its working
Yo la...
I know its a simple thing but somehow I was not getting it...
Thanks a lot for helping me out (as usual, nothing new ) |
Edited by - kolucoms6 on 14 April 2007 13:24:02 |
 |
|
|
Topic  |
|