Jump to content

Test:DataTable2: Difference between revisions

From RiskiPedia
Updated with some usage info.
Better wiki markup
Line 4: Line 4:


{{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}}
{{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}}
<pre>
<nowiki>{{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}}</nowiki>
<nowiki>{{#dt2-table2JS:all_cause_mortality|all cause mortality daily|1=1}}</nowiki>
</pre>
Arguments to dt2-table2JS are:
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
# The name of the Javascript window property to populate-- it will be dt2_ plus the name you choose.
3. A WHERE clause to choose which rows to include (WHERE 1=1 will select all rows)
# 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)

Revision as of 22:45, 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)