473,698 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Table Widget for IE? Fixed header, sorting columns, etc

I'm looking for the best JS/CSS solution to add functionality to tables.
The only browser which needs to be supported is IE5.5+, but no activeX can
be used.

to be able to do:
- Fixed header row
- Data sorting (preferrably intelligently determining data type based on
content)
- If possible, locking the first column from scrolling

I've seen one solution at
http://web.tampabay.rr.com/bmerkey/e...olumn-csv.html which is
pretty good, but it uses a DIV that scrolls and puts the table within it,
making the header row move down as the DIV is scrolled. This works, but it's
not as elegant and simple as I'd like.

I wish IE would support tbody{scroll:au to} but we're not that lucky :(

--
Matt Kruse
http://www.JavascriptToolbox.com
Jul 23 '05
17 3686
On Wed, 1 Sep 2004 10:49:41 -0500, "Matt Kruse"
<ne********@mat tkruse.com> wrote:
I'm looking for the best JS/CSS solution to add functionality to tables.
The only browser which needs to be supported is IE5.5+, but no activeX can
be used.

to be able to do:
- Fixed header row
- Data sorting (preferrably intelligently determining data type based on
content)

Doesn't your sorting JS routine help you?

http://www.mattkruse.com/javascript/sorttable/

HTH lol

Al.
- If possible, locking the first column from scrolling

I've seen one solution at
http://web.tampabay.rr.com/bmerkey/e...olumn-csv.html which is
pretty good, but it uses a DIV that scrolls and puts the table within it,
making the header row move down as the DIV is scrolled. This works, but it's
not as elegant and simple as I'd like.

I wish IE would support tbody{scroll:au to} but we're not that lucky :(


Jul 23 '05 #11
Harag wrote:
Doesn't your sorting JS routine help you?
http://www.mattkruse.com/javascript/sorttable/
HTH lol


Nah, that's ancient and only around for NS4-supporters who still need
client-side sorting.
Which probably doesn't even exist as a requirement for anyone anymore, so
I'll go ahead and remove it when I get time...

--
Matt Kruse
http://www.JavascriptToolbox.com
Jul 23 '05 #12
On Thu, 2 Sep 2004 09:02:50 -0500, "Matt Kruse"
<ne********@mat tkruse.com> wrote:
Harag wrote:
Doesn't your sorting JS routine help you?
http://www.mattkruse.com/javascript/sorttable/
HTH lol


Nah, that's ancient and only around for NS4-supporters who still need
client-side sorting.
Which probably doesn't even exist as a requirement for anyone anymore, so
I'll go ahead and remove it when I get time...

No don't remove it... replace it :) when you find a cool sorting
script please list it.

Al.
Jul 23 '05 #13
JRS: In article <ch*********@ne ws1.newsguy.com >, dated Wed, 1 Sep 2004
16:13:36, seen in news:comp.lang. javascript, Matt Kruse
<ne********@mat tkruse.com> posted :

Actually, I was thinking of just looking at the first 3-5 values. If they're
all numeric, use numeric sort. If they match \d+/\d+/\d+ then use date. Etc,
etc.


\d+/\d+/\d+ may be sufficient to suggest a date; but \d+-\d+-\d+ also
should suggest a date. One should not disregard US Federal standards,
even if they match international ones.

But that is not sufficient information to enable a sort.

The field order can be YMD, DMY, or MDY; which it is may be evident on
closer inspection, or may remain uncertain.

The year may be YYYY or YY; in the latter case, it will generally need
to be windowed into YYYY before sorting.

If the field is a sensible date, it can be sorted as a string; hence it
does not need to be recognised.

BTW, not only can YYYY-MM-DD be sorted as string, but YYYY-WW-D can.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demo n.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demo n.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 23 '05 #14
Matt Kruse wrote:
Mick White wrote:
http://mickweb.com/football/aleague/profiles.html
Something like this?

For purely sorting, that works. But it doesn't do it intelligently - it
requires a parameter to explicitly say what the data type is.

It would be easy enough to distinguish between String and Number. Just
test the first entry in the column, and select the appropriate sort
function. You can add your own rules for dates, heights, etc.
Mick
Jul 23 '05 #15
Mick White wrote:
Matt Kruse wrote:
Mick White wrote:
http://mickweb.com/football/aleague/profiles.html
Something like this?


For purely sorting, that works. But it doesn't do it intelligently - it
requires a parameter to explicitly say what the data type is.

It would be easy enough to distinguish between String and Number. Just
test the first entry in the column, and select the appropriate sort
function. You can add your own rules for dates, heights, etc.


That won't work.

var s='1 day at a time';

Number or String?
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #16
Mick White wrote:
Matt Kruse wrote:
Mick White wrote:
http://mickweb.com/football/aleague/profiles.html
Something like this?


For purely sorting, that works. But it doesn't do it intelligently - it
requires a parameter to explicitly say what the data type is.

It would be easy enough to distinguish between String and Number. Just
test the first entry in the column, and select the appropriate sort
function. You can add your own rules for dates, heights, etc.
Mick


That won't work.

var s='1 day at a time';

Number or String?

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #17
Randy Webb wrote:
Mick White wrote:
It would be easy enough to distinguish between String and Number. Just
test the first entry in the column, and select the appropriate sort
function. You can add your own rules for dates, heights, etc.

That won't work.

var s='1 day at a time';

Number or String?


Neither, it's the start of a Baptist Hymn....
Mick

Jul 23 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2892
by: Margaret MacDonald | last post by:
It appears that the 'table.field' dot notation is not preserved by php's mysql library. I can create some join 'SELECT a.id, b.id FROM table1 AS a, table2 AS b' but when I try to refer to the fields as 'a.id' and 'b.id' the reference fails because the table aliases have been discarded from the dataset as managed by php. 'a.id' has become merely 'id', and 'b.id' no longer has a fieldname -- the only way to refer to it is by the numeric...
9
6229
by: johkar | last post by:
I only have IE 6 and dial-up. Can you help me determine which browsers support this code? Thanks, John <html> <head> <title>Fixed Table Headers</title> <script language="JavaScript" type="text/javascript"> function fix(){
2
3192
by: Mel | last post by:
Scrollable table widget with fixed header is there such thing ? thanks, Mel
0
1499
by: Tim N. van der Leeuw | last post by:
Hi, I need to display some hierarchical data, and because I don't want to force users to install too many things beyond Python itself, I'm hoping to use Tix which is at least included with Python. I've managed to use the Tix HList widget to display a tree of items (at least in a proof-of-concept miniprogram) but I actually need to display 2 columns -- perhaps more.
10
2194
by: Omar | last post by:
I'm looking for a programming language or module that sorta looks and feels like MS Excel (I love and think in tables), yet has the power and open-endedness of python or javascript. I'm still pretty new to python. any ideas? i've been having some fun with VBA in excel, but I want something I can save as en exe and call my own creation, y'know?
7
4822
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the expandable row, the hidden row is made visible with css. The problem is when i sort the rows, the hidden rows get sorted as well which i don't want and want to be moved (while sorting) relative to their parent rows. The following is my complete html code...
1
5192
by: MissMarie | last post by:
I've been playing around with DIV tables in myspace to better learn how to rewrite my own code for my business site without having to pay someone to design it. I've tried embedding a slideshow into a div table and after I save it I noticed that the slideshow does not show up and the embed code I added is altered. Can anyone help me figure this out? The embed code that I'm talking about is three quarters down the code page under {PHOTOS},...
5
13781
by: Romulo NF | last post by:
Greetings, I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with drag&drop on the same page (which was not possible). Now i´ve a new concept of the script, more object oriented. I´ve also commented the whole code so you guys can easier understand it engine. What exactly we need when trying to make a column drag &...
5
4946
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums there are, it crashes. There are currently 6 columns, and I only want 4. How do I remove the last two (discount and date)? Here is a link: http://www.jaredmoore.com/tablesorter/docs/salestable.html Here is some jquery js that I think...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.