title: How can i use dropdown in table <td> tag
body: <p>I have an Inline editable Table which updates the Mysql table for the team group column I want to use the drop-down list.</p>
  
  <p>But the table is saving all the value of Dropdown instead of the one i have selected</p>
  
  <p>Below is the code I'm working with and few screenshot for your reference</p>
  
  <pre><code>  &lt;td class="editable-col" contenteditable="True" col-index='5' oldVal ="&lt;?php echo $res['TeamGroup'];?&gt;" nowrap&gt;
                 &lt;?php echo $res['TeamGroup'];?&gt;
  &lt;select required&gt;
    &lt;option value=""&gt;None&lt;/option&gt;
    &lt;option value="volvo"&gt;Volvo&lt;/option&gt;
    &lt;option value="saab"&gt;Saab&lt;/option&gt;
    &lt;option value="mercedes"&gt;Mercedes&lt;/option&gt;
    &lt;option value="audi"&gt;Audi&lt;/option&gt;
  &lt;/select&gt;
  
              &lt;/td&gt;
  </code></pre>
  
  <p>As suggested i'm adding the script-</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){
      $('td.editable-col').on('focusout', function() {
          data = {};
          data['val'] = $(this).text().trim();
          data['id'] = $(this).parent('tr').attr('data-row-id');
          data['index'] = $(this).attr('col-index');
  
        if($(this).attr('oldVal') === data['val'])
        {
          return false;
        }
  
          $.ajax({
  
                      type: "POST",
                      url: "server.php",
                      cache:false,
                      data: data,
                      dataType: "json",
                      success: function(response)
                      {
                          if(response.status) {
                              $("#msg").removeClass('alert-danger');
                              $("#msg").addClass('alert-success').html(response.msg);
                          } else {
                              $("#msg").removeClass('alert-success');
                              $("#msg").addClass('alert-danger').html(response.msg);
                          }
                      }
                  });
      });
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/VB14T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VB14T.png" alt="Table with text input box working fine"></a></p>
  
  <p><a href="https://i.stack.imgur.com/vgV6a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vgV6a.png" alt="Tabel after setting the dropdown"></a></p>
  
  <p><a href="https://i.stack.imgur.com/7mP86.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7mP86.png" alt="if Select one value in drop down it pastes all in it"></a></p>