Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #19403 > unrolled thread

What is the best algoritm for displaying a very special html table

Started by"Tony" <tony.johansson@inport.com>
First post2013-04-22 13:51 +0200
Last post2013-04-23 17:20 +0200
Articles 4 — 3 participants

Back to article view | Back to comp.lang.javascript


Contents

  What is the best algoritm for displaying a very special html table "Tony" <tony.johansson@inport.com> - 2013-04-22 13:51 +0200
    Re: What is the best algoritm for displaying a very special html table JJ <duh@nah.meh> - 2013-04-22 19:53 +0700
    Re: What is the best algoritm for displaying a very special html table Stefan Weiss <krewecherl@gmail.com> - 2013-04-22 15:40 +0200
      Re: What is the best algoritm for displaying a very special html table "Tony" <tony.johansson@inport.com> - 2013-04-23 17:20 +0200

#19403 — What is the best algoritm for displaying a very special html table

From"Tony" <tony.johansson@inport.com>
Date2013-04-22 13:51 +0200
SubjectWhat is the best algoritm for displaying a very special html table
Message-ID<kl382v$cmo$1@dont-email.me>
Hello!

All these bridges below must be opened when a vessel must pass that's why we 
talk about bookings.
Each booking consist of three parts. These are ö,v and c.
Each ! is a DateTime in format yyyy-MM-dd  hh:mm
In the table below I have written !ö! which means.
A booking time for the bridge to open.
A start time when the bridge start to open and the end time when the bridge 
is fully opened.

The !v! below means.
A start time when the vessel can pass the opened bridge and the end time 
when the vessel has passed the opened bridge.

The !c! below means.
A start time when the bridge start to close down and the end time when the 
bridge is fully closed.

I need to create a html table that is different to the normal html table.
The table consist of 9 columns [1-9] and different number of row but the 
column width is the same for all columns.
The column to the left is the name  of a bridge.
If we had for example three rows then the column to the left could be
Göta älv bron
Marieholmsbron
Jordfallsbron

Now to the difficult part of the html table.
Each row describe one or more bridge booking in some way.
For example in row 1 Göta älv below I have written a booking !ö!v!c!
So each interval column of hour is of same width but the time for ö,v and c 
could be very different.
Can anybody give me some hint about what kind of algoritm is suitable to use 
when displaying the html table with it's contents ?

I have written some example here.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BridgeName        |  11:00                 |    12:00               | 
13:00             |   14:00                |    15:00               | 
16:00             |     17:00              |   18:00                |
______________________________________________________________________________________________________________________________________
Göta älv bron      |   !ö!v!c!                         !  ö  !  v  ! c !
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Marieholmsbron | 
!    ö   !  v  !  c  ! 
!ö!v!c!
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Jordfallsbron       | 
!ö!v!c! 
!ö!v!c!
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

//Tony 

[toc] | [next] | [standalone]


#19404

FromJJ <duh@nah.meh>
Date2013-04-22 19:53 +0700
Message-ID<nux1szayhlui$.9nvu7cyu95ob$.dlg@40tude.net>
In reply to#19403
On Mon, 22 Apr 2013 13:51:49 +0200, Tony wrote:
> Now to the difficult part of the html table.
> Each row describe one or more bridge booking in some way.
> For example in row 1 Göta älv below I have written a booking !ö!v!c!
> So each interval column of hour is of same width but the time for ö,v and c 
> could be very different.
> Can anybody give me some hint about what kind of algoritm is suitable to use 
> when displaying the html table with it's contents ?

You're probably looking for spanned-column or spanned-row table cells.

> I have written some example here.

You might want to use "Courrier New" font when composing a newsgroups text,
cause the result looks awful.

[toc] | [prev] | [next] | [standalone]


#19405

FromStefan Weiss <krewecherl@gmail.com>
Date2013-04-22 15:40 +0200
Message-ID<kl3ek0$tk9$1@news.albasani.net>
In reply to#19403
On 2013-04-22 13:51, Tony wrote:
> All these bridges below must be opened when a vessel must pass that's why we 
> talk about bookings.
...
> I need to create a html table that is different to the normal html table.
> The table consist of 9 columns [1-9] and different number of row but the 
> column width is the same for all columns.
> The column to the left is the name  of a bridge.
> If we had for example three rows then the column to the left could be
> Göta älv bron
> Marieholmsbron
> Jordfallsbron
> 
> Now to the difficult part of the html table.
> Each row describe one or more bridge booking in some way.
> For example in row 1 Göta älv below I have written a booking !ö!v!c!
> So each interval column of hour is of same width but the time for ö,v and c 
> could be very different.
> Can anybody give me some hint about what kind of algoritm is suitable to use 
> when displaying the html table with it's contents ?

I tried to write an explanation, but it got too complicated.
Is that what you were looking for?

http://foo.at/paste/2013/bridges.html

Note, there is NO error handling and no boundary checking, you'll have
to add that yourself.

- stefan

[toc] | [prev] | [next] | [standalone]


#19425

From"Tony" <tony.johansson@inport.com>
Date2013-04-23 17:20 +0200
Message-ID<kl68lp$n7m$1@dont-email.me>
In reply to#19405

"Stefan Weiss"  wrote in message news:kl3ek0$tk9$1@news.albasani.net...

On 2013-04-22 13:51, Tony wrote:
> All these bridges below must be opened when a vessel must pass that's why 
> we
> talk about bookings.
...
> I need to create a html table that is different to the normal html table.
> The table consist of 9 columns [1-9] and different number of row but the
> column width is the same for all columns.
> The column to the left is the name  of a bridge.
> If we had for example three rows then the column to the left could be
> Göta älv bron
> Marieholmsbron
> Jordfallsbron
>
> Now to the difficult part of the html table.
> Each row describe one or more bridge booking in some way.
> For example in row 1 Göta älv below I have written a booking !ö!v!c!
> So each interval column of hour is of same width but the time for ö,v and 
> c
> could be very different.
> Can anybody give me some hint about what kind of algoritm is suitable to 
> use
> when displaying the html table with it's contents ?

I tried to write an explanation, but it got too complicated.
Is that what you were looking for?

http://foo.at/paste/2013/bridges.html

Note, there is NO error handling and no boundary checking, you'll have
to add that yourself.

- stefan

many thanks Stefan this will be useful

//Tony 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web