| intel i3 1.9 ghz vs amd athlon x2 2.7 duel core 5700+ in Hardware Hangout |
|
|
| EA abandons Online Pass feature for future games in Gamers' Hangout |
|
|
| Britain's oldest tortoise dies after rat attack in Real World News |
|
|
| English language help required in General Discussion |
|
|
| GNU / Linux May 2013 Desktops in Linux / Unix Discussion & Support |
|
Posted 21 February 2013 - 17:05
Posted 21 February 2013 - 17:21
Posted 21 February 2013 - 17:32
threetonesun, on 21 February 2013 - 17:23, said:
var arrayToStore = new Array();
var $strings = $('form input');
$strings.each(function(){
arrayToStore.push(this.val());
})
Posted 21 February 2013 - 17:33
Posted 21 February 2013 - 17:56
Posted 21 February 2013 - 17:58
Shadrack, on 21 February 2013 - 17:32, said:
Posted 21 February 2013 - 18:02
threetonesun, on 21 February 2013 - 17:58, said:
Posted 21 February 2013 - 18:36
(function store(){
var arrayToStore = [['',''],['','']];
var $strings = $('form input');
$strings.each(function(){
var x = $(this).attr('data-loc1');
var y = $(this).attr('data-loc2');
arrayToStore[x][y] = $(this).val();
});
console.log(arrayToStore);
})();
Posted 21 February 2013 - 20:19
<form> <table> <tr> <th> </th> <th>Independent</th> <th>Pass</th> <th>Fail</th> </tr> <tr> <th>Data Labels</th> <td><input type="textbox" data-row="0" data-col="0" /></td> <td><input type="textbox" data-row="0" data-col="1" /></td> <td><input type="textbox" data-row="0" data-col="2" /></td> </tr> <tr> <th>Data Row 1</th> <td><input type="textbox" data-row="1" data-col="0" /></td> <td><input type="textbox" data-row="1" data-col="1" /></td> <td><input type="textbox" data-row="1" data-col="2" /></td> </tr> <tr> <th>Data Row 2</th> <td><input type="textbox" data-row="2" data-col="0" /></td> <td><input type="textbox" data-row="2" data-col="1" /></td> <td><input type="textbox" data-row="2" data-col="2" /></td> </tr> </table> </form> <p><input type="button" value="Run Regression" onClick="ProcessButtonClick()"/></p>
function ProcessButtonClick() {
var arrayToStore = [['',''],['','']];
var $strings = $('form input');
$strings.each(function(){
var x = parseInt($(this).attr('data-row'));
var y = parseInt($(this).attr('data-col'));
arrayToStore[x][y] = $(this).val();
});
console.log(arrayToStore);
}
Quote
Posted 21 February 2013 - 22:04
var arrayToStore = [['','',''],['','',''],['','','']]
Posted 21 February 2013 - 22:08