DynamicTable - turn your HTML table elements into interactive tables

September 12th, 2012

Do you also like the moments when you browse through the code you wrote years ago? I've just had one of these and discovered a tiny JavaScript library which I wrote about five years ago that turns your HTML table elements into interactive tables with sorting, filtering and paging and couple of visual effects as well. A JavaScript library that runs on Firefox 2, IE 6 and other ancient browsers without any external help. No jQuery, Prototype or any other help. I decided to share my excitment with you and so I translated documentation and demo from Czech to English and here it is.

The code can be found on Github and is licensed under the MIT license.


AFNAfghanistan Afghanis75.39663894500.0132631907
ALLAlbania Leke149.71749104910.0066792463
ALLAlbania Leke120.15850003940.0083223409
DZDAlgeria Dinars99.26545443150.0100739981
DZDAlgeria Dinars237.34370154580.0042132991
ARSArgentina Pesos4.96342934110.2014736045
AUDAustralia Dollars7.12248602170.1404004159
AUDAustralia Dollars1.67903960910.5955785644
BSDBahamas Dollars1.56619524190.6384900000
BHDBahrain Dinars0.59037729641.6938320732
BDTBangladesh Taka107.44099359430.0093074344
BBDBarbados Dollars3.10889756320.3216574299
BMDBermuda Dollars1.56619524190.6384900000
BRLBrazil Reais2.61003305670.3831369099
BGNBulgaria Leva1.92485396830.5195199306
XOFCFA BCEAO Francs 655.95700000000.0015244902
XAFCFA BEAC Francs655.95700000000.0015244902
CADCanada Dollars1.58765236730.6298608062
CLPChile Pesos711.05263982210.0014063656
CNYChina Yuan Renminbi10.97981174330.0910762428
COPColombia Pesos2758.85291551750.0003624695
XPFComptoirs Français du Pacifique Francs119.33174224340.0083800000
CRCCosta Rica Colones769.31510314550.0012998575
HRKCroatia Kuna7.26213409760.1377005694
CZKCzech Republic Koruny123.61133298880.0080898731
CZKCzech Republic Koruny25.27839120420.0395594796
DKKDenmark Kroner7.47952199720.1336983834
DOPDominican Republic Pesos52.83716268070.0189260730
DOPDominican Republic Pesos61.97799182450.0161347596
XCDEast Caribbean Dollars4.15041739100.2409396226
EGPEgypt Pounds8.39660762110.1190957164
EEKEstonia Krooni15.64664000000.0639114851
EUREuro4.17800000000.2393489708
EUREuro1.00000000001.0000000000
FJDFiji Dollars2.34460365550.4265113200
FJDFiji Dollars2.85807185610.3498862346
XAUGold Ounces0.0017694084565.1606477424
HKDHong Kong Dollars12.20301022730.0819469935
HUFHungary Forint247.91304754250.0040336723
XDRIMF Special Drawing Rights0.95400000001.0482180294
ISKIceland Kronur115.06993061760.0086903676
ISKIceland Kronur460.97014205390.0021693379
INRIndia Rupees210.19522623690.0047574820
INRIndia Rupees62.72611943800.0159423221
IDRIndonesia Rupiahs14424.97141693680.0000693242
IRRIran Rials43966.41450923270.0000227446
IRRIran Rials14037.80795313940.0000712362
IQDIraq Dinars1880.21738789960.0005318534
ILSIsrael New Shekels5.45819041800.1832109039
JMDJamaica Dollars113.15760622720.0088372318
JPYJapan Yen163.51084590200.0061158023
JPYJapan Yen424.96468849940.0023531367
JODJordan Dinars1.11043242650.9005500705
KESKenya Shillings97.41734404610.0102651125
KESKenya Shillings302.96793998340.0033006793
KWDKuwait Dinars0.41621638552.4025964252
KWDKuwait Dinars1.58120604860.6324286458
LBPLebanon Pounds2366.52101050920.0004225612
MYRMalaysia Ringgits4.93265360460.2027306355
MURMauritius Rupees40.21206283580.0248681597
MXNMexico Pesos23.69189775880.0422085225
MXNMexico Pesos16.38443828410.0610335236
MADMorocco Dirhams11.48026583480.0871059969
NZDNew Zealand Dollars2.00230230700.4994250851
NOKNorway Kroner20.20583689640.0494906499
NOKNorway Kroner8.02455794140.1246174565
OMROman Rials0.60290685841.6586309910
OMROman Rials1.36558403420.7322874133
PKRPakistan Rupees100.69069215780.0099314046
XPDPalladium Ounces0.0035474411281.8933350005
PENPeru Nuevos Soles4.34376419360.2302150751
PHPPhilippines Pesos65.49828521670.0152675753
XPTPlatinum Ounces0.00080030421249.5249300061
PLNPoland Zlotych3.43928644140.2907579863
QARQatar Riyals5.70093063960.1754099573
QARQatar Riyals3.91653934940.2553274487
RONRomania New Lei3.64469294740.2743715354
RUBRussia Rubles68.66871525000.0145626723
RUBRussia Rubles36.99823019940.0270283199
SARSaudi Arabia Riyals5.87448536390.1702276775
XAGSilver Ounces0.35951535642.7815223528
XAGSilver Ounces0.093114570410.7394578043
SGDSingapore Dollars2.13268956440.4688914958
SKKSlovakia Koruny32.39988096920.0308643109
SKKSlovakia Koruny32.17308180240.0310818841
ZARSouth Africa Rand11.97826118840.0834845713
KRWSouth Korea Won1557.08781656720.0006422245
KRWSouth Korea Won736.50253723630.0013577686
LKRSri Lanka Rupees168.67922766480.0059284123
SDGSudan Pounds3.10082381870.3224949428
SDGSudan Pounds3.16410593740.3160450439
SEKSweden Kronor9.37446162040.1066727926
CHFSwitzerland Francs5.67877139810.1760944278
CHFSwitzerland Francs1.62296981940.6161544029
TWDTaiwan New Dollars47.51366505350.0210465768
THBThailand Baht49.40739718820.0202398842
TTDTrinidad and Tobago Dollars9.80438220670.1019952077
TNDTunisia Dinars1.20565803690.8294225803
TNDTunisia Dinars1.82399097870.5482483256
TRYTurkey New Lira2.01068145150.4973438230
AEDUnited Arab Emirates Dirhams5.75185202590.1738570456
GBPUnited Kingdom Pounds0.78980876761.2661292721
USDUnited States Dollars1.56619524190.6384900000
VEFVenezuela Bolivares Fuertes14.38057729960.0695382375
VEFVenezuela Bolivares Fuertes3.36309104290.2973455037
VNDVietnam Dong25228.27290237910.0000396381
ZMKZambia Kwacha5411.20456076050.0001848017


DynamicTable should be fast enough to handle hundreds or thousands of rows. Sorting and filtering is run on a disconnected DOM tree. A quick manual test in the latest Google Chrome and Firefox on my MacBook Pro 2.3GHz Intel Core i7 showed that sorting on a table with 2000 rows was instant, a very little slowdown was observable with more than 6000 rows.

There are four default sort functions available at this time (alphanumeric, numbers, czech and english date formats) but new custom sort or even filter function can be added very easily either through an options object passed as the second argument to the DynamicTable constructor function or as a direct extension of DynamicTable.prototype.sortFunctions object and rewrite of DynamicTable.prototype.filterFunction. UI controls added by DynamicTable can be styled in CSS. Please consult the documentation available on Github for more information.