3

I'm creating a Sidebar in a google spreadsheet, the sidebar will take the information from the spreadsheet according to what the user select from the dropdown list. and here is the question: How can I get the row data according to the selection, and show it inside the sidebar here is my code: Page.html

<?!= include('Stylesheet'); ?>
<h2 class="sansserif" align="center">Select an event <h2/><br/>
<br/> 
  <select id="thedropdown">
    <option value= "null">Select event</option>
    <? var data = getData(); ?>
    <? for (var i = 1; i < data.length; i++) { ?>
      <?if(data[i][0] != ""){ ?>
      <option value= "<?= data[i][0] ?>"> <?= data[i][0] ?></option>
      <?}?>
    <?}?>
  </select>
Dimitri Dewaele
  • 10,311
  • 21
  • 80
  • 127
123345566i
  • 35
  • 6
  • Read this brilliant post, it answers and provides an example: http://stackoverflow.com/questions/24773177/how-to-poll-a-google-doc-from-an-add-on – Serge insas Nov 25 '14 at 19:40
  • Thanks that really help! here is another link I found http://stackoverflow.com/questions/26341202/interact-with-sidebar-in-google-sheets – 123345566i Nov 26 '14 at 07:25
  • Yes, always the same answerer :-) ... I mentioned the other one because you are using HTMLService. – Serge insas Nov 26 '14 at 07:57

0 Answers0