title: How can I get text value from modal with javascript?
body: <p>I'm fetching the values from my table in ajax.</p>
  <pre><code>$(data.mesIzinTanimList).each(function (index, element) {
  
      if (element.izinTanimiVarmi == 'yok')
          tr = &quot;&lt;tr class='bg-warning text-warning-50' row='&quot; + element.userId + &quot;' &gt;&quot;;
      else
          tr = &quot;&lt;tr class='bg-light text-white-50 ' row='&quot; + element.userId + &quot;' &gt;&quot;;
  
      tr += &quot;&lt;td&gt;&quot; + element.sicilNo + &quot;&lt;/td&gt;&quot;;
      tr += &quot;&lt;td&gt;&quot; + element.adSoyad + &quot;&lt;/td&gt;&quot;;
      tr += &quot;&lt;td&gt;&quot; + element.bagliOlduguKisi + &quot;&lt;/td&gt;&quot;;
      tr += &quot;&lt;td&gt;&quot; + element.bagliOlduguKisiSicilNo + &quot;&lt;/td&gt;&quot;;
      tr += &quot;&lt;td style='display:none'&gt;&quot; + element.bagliOlduguKisiId + &quot;&lt;/td&gt;&quot;;
      tr += &quot;&lt;td&gt; &lt;button onclick= 'tanimlaBtn(&quot; + element.userId + &quot; , &quot; + element.adiSoyadi + &quot; ,&quot; + element.bagliOlduguKisiId + &quot;, &quot; + element.bagliOlduguKisi + &quot;)' type='button' class ='btn btn-info'&gt; Tanımla &lt;/button&gt;&lt;/td&gt;&quot;;
      tr += &quot;&lt;/tr&gt;&quot;;
  
      $('#IzinTanimListe').append(tr);
  });
  </code></pre>
  <p>I open a modal with the define Btn onclick feature.</p>
  <pre><code>function tanimlaBtn(userId, adSoyad, bagliOlduguKisiId, bagliOlduguKisi) {        
      document.getElementById('userId').value = userId;
      document.getElementById('bagliOlduguKisiId').value = bagliOlduguKisiId;
      document.getElementById('bagliOlduguKisi').value = bagliOlduguKisi;
      document.getElementById('adSoyad').value = adSoyad;      
  }
  </code></pre>
  <p>The <code>adSoyad</code> and <code>bagliOlduguKisi</code> information appears as undefined. They should be string values.</p>
  <p>How can I solve this?</p>