Test:DataTable2: Difference between revisions
Appearance
Test page for DataTable2::table2JS |
Updated with some usage info. |
||
Line 1: | Line 1: | ||
This page uses our DataTable2::table2JS extension. If you View Source you should see JavaScript code that adds a variable to the window object containing data from the All Cause Mortality Daily data page. | This page uses our DataTable2::table2JS extension. If you View Source you should see JavaScript code that adds a variable to the window object containing data from the All Cause Mortality Daily data page. | ||
Or in Chrome, open up the developer javascript console and you should see window.dt2_all_cause_mortality set to an array of Objects. | |||
{{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}} | {{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}} | ||
<nowiki>{{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}}</nowiki> | |||
Arguments to dt2-table2JS are: | |||
1. The name of the Javascript window property to populate-- it will be dt2_ plus the name you choose. | |||
2. The name of the DataTable2 table to pull the data from | |||
3. A WHERE clause to choose which rows to include (WHERE 1=1 will select all rows) |
Revision as of 22:44, 6 February 2025
This page uses our DataTable2::table2JS extension. If you View Source you should see JavaScript code that adds a variable to the window object containing data from the All Cause Mortality Daily data page.
Or in Chrome, open up the developer javascript console and you should see window.dt2_all_cause_mortality set to an array of Objects.
{{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}}
Arguments to dt2-table2JS are:
1. The name of the Javascript window property to populate-- it will be dt2_ plus the name you choose.
2. The name of the DataTable2 table to pull the data from
3. A WHERE clause to choose which rows to include (WHERE 1=1 will select all rows)