Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 HTML : Vey Simple Question about Table
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kolucoms6
Average Member

845 Posts

Posted - 13 April 2007 :  14:41:05  Show Profile

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  Show Profile  Visit HuwR's Homepage
what ?
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 13 April 2007 :  15:09:51  Show Profile
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
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 13 April 2007 :  16:41:59  Show Profile  Visit JJenson's Homepage
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
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 13 April 2007 :  16:49:29  Show Profile

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
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 13 April 2007 :  17:18:45  Show Profile  Visit AnonJr's Homepage
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.
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 13 April 2007 :  17:26:02  Show Profile

May be You are right.. But I am not a ASP/HTML developer.

Just trying out things... Any example code will definitely help..

Go to Top of Page

Roger Fredriksson
Average Member

Sweden
556 Posts

Posted - 14 April 2007 :  05:11:49  Show Profile  Visit Roger Fredriksson's Homepage
Create the recordset and populate an array shuld do the trick would it not?

rf/www.avgifter.com
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 14 April 2007 :  05:58:45  Show Profile
Array.. oh Ok...

No other simple way ? :-)
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 14 April 2007 :  06:30:34  Show Profile  Visit HuwR's Homepage
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.
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 14 April 2007 :  09:28:53  Show Profile  Send pdrg a Yahoo! Message
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
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 14 April 2007 :  11:59:49  Show Profile

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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07