- Menu scripts
- Window scripts
- Calendar scripts
- Gallery scripts
- Form widgets
- Tab view scripts
- Table widgets
- Drag and drop
- Folder trees
- AJAX scripts
- Content Effects
- Misc scripts
- Chess widgets
- DHTML Suite
Download table widget
Use a strict or loose doctype
This table widget requires a valid doctype in order to work properly in IE. You can either choose the strict doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
or a loose doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Choose the one that makes your page look best across different browsers. The doctype tag should be placed on the first line of your HTML file.
Put this into your <HEAD> section
Put this into your <BODY> section
There are two arrow used in this script to indicate sorted columns. Right click on them below and select "Save target as". Put them in a subfolder called "images".
How to use
You create the table by use of plain HTML as shown in the textaera code for <BODY>. What's important is that you:
- Have a parent div like this: <div class="widget_tableDiv">
- Use a <THEAD> tag as parent of your header row.
- Use <TD> and not <TH> as tags for your header content
- Use a <TBODY> as parent of your table data rows(<TR>).
Look in the example for further help.
The arguments you send to this function are:
- 'myTable' = The ID of your table. example: <TABLE id="myTable" ...
- 500 = Width of table widget
- 250 = Height of table widget
- Array('S','N','S','N','S') = An array telling how the columns should be sorted. "S" = String, "N" = Numeric. Use false(without quotes) instead of "S" and "N" if you have columns that shouldn't be sorted at all.