Test:DataTable2: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
{{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}} | {{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}} | ||
{{#fetchdata: | {{#fetchdata:}} | ||
your chance to die this month is <span class='deathData'>Loading</span> | your chance to die this month is <span class='deathData'>Loading</span> |
Revision as of 20:23, 7 May 2025
Loading...
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.
your chance to die this month is Loading
{{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}}
Arguments to dt2-table2JS are:
- The name of the Javascript window property to populate-- it will be dt2_ plus the name you choose.
- The name of the DataTable2 table to pull the data from
- A WHERE clause to choose which rows to include (WHERE 1=1 will select all rows)