Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-02-2002, 03:43 AM   PM User | #1
rah111
New Coder

 
Join Date: Jun 2002
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
rah111 is an unknown quantity at this point
Lining stuff up

Hi all.

I have a character field in a data table which is seven characters long and the characters that it contains can occur anywhere within the field. In fact when a given character does occur it always occurs in the same place.

For simplicity, let's say that the possible codes are a,b,c,d,e,f,g. Then when "d" occurs it occurs in the 4th position of the field, when "a" occurs it occurs in the 1st position of the field etc.

So I might have the following records:

"ab d fg"
" b de "
" cd "
" fg"
"a d "

When I write these into a <table><tr><td>...</td></tr></table> everything "comes together". For example, the bottom record appears as "ad" without any spaces in between the "a" and "d".

Is it possible to get the values in the fields for these records to line up properly in a table, with all the "a"s in the same vertical line, all the "b"s in the same vertical line etc.?

Have tried using &nbsp at the beginning of the <td> but that doesn't work.

Any help would be appreciated.

Russell.
rah111 is offline   Reply With Quote
Old 07-02-2002, 04:11 AM   PM User | #2
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
put them in between <pre> </pre> tags or replace every space with &amp;nbsp;
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv is offline   Reply With Quote
Old 07-02-2002, 06:02 AM   PM User | #3
Cloudski
Regular Coder

 
Join Date: Jul 2002
Location: U.S. (Wish Japan though)
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Cloudski is an unknown quantity at this point
Or, you could simply have a single cell for every entry.... say like if you don't have anything in the cell, just put &nbsp; and then start the next cell....
Cloudski is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:49 PM.


Advertisement
Log in to turn off these ads.