0

Hi,

I am new to web development so please bear with me, i am looking to create statistic calculators like f test etc.

In order to do that,

i need to provide input fields to enter multiple numbers in input area along with providing ability to copy paste data from a spreadsheet.

I am planning to use tables to create these input fields. How can i collect data from these rows and perform calculations on them like calculating mean(average). Please note that as idea is to provide ability to copy/paste data, rows will be added dynamically so how can i handle that part also.

Thanks
Akhil

3
Contributors
3
Replies
15
Views
2 Years
Discussion Span
Last Post by akhil1
1

You could have a click on a row call a function that will collect all the values in said row and insert them into the calculator fields. I would suggest using jQuery for ease and speed. You could use

  • selectors for selecting certain elements
  • .click() for registering a row click
  • .after() and .append() to attach new rows to a table
  • .val() for getting/setting the value of an input
  • .html() for getting/setting the inner html of an element (i.e. TD)

You could give every row a number and use that as an identifier for the click function, or you could use the keyword this to get the row element the click was made on.

0

jQuery would indeed be excellent for this task. If you don't know it yet, I suggest you read some tutorials. What Traevel says will also be much clearer if you have a basic understanding of what you can do with Javascript / jQuery.

0

Thanks Traevel and minitauros for your great suggestions, i have some ground in jquery and javascript, but i wasn't able to think around it the way you guys have explained it. Thanks a lot for your suggestion, these pointers are going to be great starters for me.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.