AnnualDataSummary: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
no edit summary
No edit summary
No edit summary
# either readDayfile.js (the JavaScript) or readDayfile.php (the PHP version of the script).
 
Please note that the table needs a good amount of space to show a full year of data (at least 900 pixels unless you start reducing the font size!)
 
In addition you need a carrier page to show the data. You can either use the page provided in the zip (datasummary.html or datasummary.php), or create your own page including:
* for both JS and PHP versions you need the script library and styling:
 
: In the <head> section.....
<pre>&lt;link rel="stylesheet" type="text/css" media="screen" href="datasummary.css" /&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/32.1/jquery.js" type="text/javascript"&gt;</pre>
: This loads the stylesheet; loads a jQuery library from Google servers rather than having the file on your server, (note manylater versions of jQuery are not supported by old versions of Internet Explorer, use the very old versionolder '1.5' used by DAJ instead of the current version '32.1' if you needwant to);
 
: This loads the stylesheet; loads a jQuery library from Google servers rather than having the file on your server, (note many versions of jQuery are not supported by old versions of Internet Explorer, use the very old version '1.5' used by DAJ instead of the current version '3.1' if you need to);
 
 
Please note that the table needs a good amount of space to show a full year of data (at least 900 pixels unless you start reducing the font size!)
 
Next you must load the scriptJavascript to build the table:
*'''for the JS version'''
: In the &lt;body&gt; section, where you want the table to appear, first declare the element and then call the script (other code can be inserted inbetween such as anchor links to your other pages):
<pre>&lt;sectiondiv id="tableDiv"&gt;
&lt;noscript&gt;Your browser has not enabled the JavaScript necessary to display the table here&lt;noscript&gt;
&lt/sectiondiv&gt;</pre>
<pre>&lt;script src="readDayfile.js" type="text/javascript"&gt;&lt;/script&gt;</pre>
 
: Once the page is loaded it runs readDayfile.js, thatand will look for your HTML element with an id attribute called 'tableData' already existing; then will insertinserting the data table within it. You can change the DIV (or HTML5 alternative blocking elements) it inserts into (see above).
: In the &lt;body&gt; section, near the end, call the script:
<pre>&lt;script src="readDayfile.js" type="text/javascript"&gt;&lt;/script&gt;</pre>
 
: Once the page is loaded it runs readDayfile.js, that will look for your HTML element with an id attribute called 'tableData'; then will insert the data table within it.
 
Other code can be inserted inbetween such as anchor links to your other pages.
 
*'''for the PHP version'''
: In the &lt;body&gt; section, use the code <pre><?php include('readDayfile.php');?></pre> to include the script that creates all the HTML elements required
 
== Localization / Language ==
5,838

edits

Navigation menu