Created
April 22, 2014 04:21
-
-
Save anonymous/11165264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sourceSet($tbodyRowsOfInputs, sourceData) { | |
//A sample sourceData: | |
//sourceData {0:{fname_0:"jan",lname_0:"ali"},1:{fname_1:"ali",fname_1:"jan"}} | |
var varNames = varNamesFromSourceData(sourceData); | |
iterateOnInputsAndDo($tbodyRowsOfInputs, function($input, trCounter, tdCounter) { | |
$input.val(sourceData[trCounter][varNames[tdCounter] + "_" + trCounter]); | |
}); | |
} | |
//error: varNames is not defined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment