Download LabArchives Widget Content for Spreadsheets

Demonstration of output table

Populate Table

//When text is input for column c, update the table
$("#ColumnC").on("input", function () {
var $elToWatch = $(this);
var $elToUpdate = $("#ColumnC_calc");
my_widget_script.watchValue($elToWatch, $elToUpdate)
});
<div class="col"><input type="text" class="fullWidth simpleCalc" id="ColumnC" name="columnc"></div>
....
<td class="ColumnC_calc">&nbsp;</td>

Calculate Values

$('#calculate').on("click", function () {
//run to give error, but allow to calc regardless
my_widget_script.data_valid_form();
my_widget_script.calcValues();
});

calcValues( )

data_valid_form( )

Show/Hide Table

$("#toggleTable").on("click", function () {
my_widget_script.resize();
my_widget_script.data_valid_form();
my_widget_script.calcValues();
$("#tableDiv").toggle();
my_widget_script.parent_class.resize_container();
});

Save CSV

$('#toCSV').on("click", function () {
var fileName //TO DO add fileName
var tableID //TO DO add tableID
var $errorMsg //TO DO add error message as jQuery
my_widget_script.toCSVFuncs(fileName, tableID, $errorMsg);});

exportTableToCSV( )

downloadCSV( )

Copy Data

Demonstration of Copy Data for Output Table
$("#copyDataButton").on("click", function () {
var $copyHead //TO DO add table
var $tableToCopy //TO DO add table
var $tableDiv //TO DO add tableDiv
var $errorMsg //TO DO add error message
var $divForCopy //TO DO add div where the table copies to
var $transpose //TO DO add transpose checkbox
my_widget_script.copyDataFuncs($copyHead, $tableToCopy, $tableDiv, $errorMsg, $divForCopy, $transpose)});

copyTable( )

PhD Candidate in Neuroscience at University of Michigan. Hope College Grad. Enjoys data organization. Passionate about teaching science. gibsonamanda.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Introduction to React Framework

Top 10 JavaScript interview questions every developer should to know

JS Interview Question/Ans Series

How to write async form validators with Angular?

The Right Way to Create Function Components in React With TypeScript

How to build a Web App using Blockchain — Part 2

Handling Events in React

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Amanda G. Gibson

Amanda G. Gibson

PhD Candidate in Neuroscience at University of Michigan. Hope College Grad. Enjoys data organization. Passionate about teaching science. gibsonamanda.com

More from Medium

Workflow with Strapi (Headless) CMS

Changes to the Microsoft Teams Room on Windows Home screen

Meet and call buttons

Native vs Cross-Platform Development

How to run react native app using expo-cli