javascript - Making a webapp with listboxes based on Google Spreadsheets with Google Apps Script -


note: question has been rewritten due changes in original code.

hi, have code.gs file , index.html file. trying create listbox in index.html file data code.gs.

i did testing, , following code gives results want:

<select multiple> <option> <?= articlenumbers(0)[[0]]?> </option> <option> <?= articlenumbers(0)[[1]]?> </option> <option> <?= articlenumbers(0)[[2]]?> </option> <option> <?= articlenumbers(1)[[0]]?> </option> <option> <?= articlenumbers(1)[[2]]?> </option> </select> 

however, making 12 - , counting - listboxes hundreds of values inserted spreadsheet, need make them loop. tried following code, hoping option-tag go in loop, doesn't seem work.

<select multiple>  <? (i=0; < 11; i++){          (j=0; j < articlenumbers(i).length; j++){  ?>               <option><?=articlenumbers(i)[[j]]?> </option>        <?}  } ?> </select>  

any suggestions

sorry, realized forgot var i , var j. correct code follows

<select multiple>  <? (var = 0; < 11; i++){        (var j = 0; j < articlenumbers(i).length; j++){  ?>           <option><?=articlenumbers(i)[[j]]?> </option>    <?}  } ?> </select>  

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -