How do I take variables in javascript?How do JavaScript closures work?How do I check if an element is hidden in jQuery?How do I remove a property from a JavaScript object?Which equals operator (== vs ===) should be used in JavaScript comparisons?How do I redirect to another webpage?How do I include a JavaScript file in another JavaScript file?What does “use strict” do in JavaScript, and what is the reasoning behind it?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?How do I return the response from an asynchronous call?

How do I tell the reader that my character is autistic in Fantasy?

cannot execute script while its permission is 'x'

What's the easiest way for a whole party to be able to communicate with a creature that doesn't know Common?

Does the Pi 4 resolve the Ethernet+USB bottleneck issue of past versions?

How can a valley surrounded by mountains be fertile and rainy?

Who are these Discworld wizards from this picture?

How can I add two boxes in minipages side by side?

Why is Japan trying to have a better relationship with Iran?

Is this homebrew Half-Phoenix race balanced?

What could a reptilian race tell by candling their eggs?

Conjugate る-ending verbs into negative form

Pshat of what did Korach take?

How did researchers find articles before the Internet and the computer era?

What is the purpose of putting a capacitor on the primary side of a step-down transformer?

What's the safest way to inform a new user of their password on an invite-only website?

Does any Greek word have a geminate consonant after a long vowel?

Choosing my first bike

How exactly is a normal force exerted, at the molecular level?

Why do we use a cylinder as a Gaussian surface for infinitely long charged wire?

What was the impact of Fischer vs. Spassky 1972 on the relationship between the USA and the Soviet Union?

Boolean Difference with Offset?

How to securely dispose of a smartphone?

Is it bad to describe a character long after their introduction?

Computing the sum of an infinite series as a variant of a geometric series



How do I take variables in javascript?


How do JavaScript closures work?How do I check if an element is hidden in jQuery?How do I remove a property from a JavaScript object?Which equals operator (== vs ===) should be used in JavaScript comparisons?How do I redirect to another webpage?How do I include a JavaScript file in another JavaScript file?What does “use strict” do in JavaScript, and what is the reasoning behind it?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?How do I return the response from an asynchronous call?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I made an AJAX request so that when I select drop down the results will be out. I am confused. The problem is that only a table is displayed. How come the data comes from the variable $grade (calculation of grade), the variable $value (calculation of total value)?



I try to get the element. $grade instead it is undefined






<script type="text/javascript">
$(document).ready(function()
$('#kategori').on('change', function(e)
var id = e.target.value;
$.get('/khs/khs_semester/' + id, function(data)
console.log(id);
console.log(data);
$('#khs').empty();
$.each(data, function(index, element)
$('#khs').append("<tr><td>" + element.kode_mk + "</td><td>" + element.nama_mk + "</td>" + "<td>" + element.semester + "</td><td>" + element.jml_sks + "</td><td>" + element.$grade + "</td></tr>");
);
);
);
);
</script>

<table class="table table-bordered">
<thead>
<tr>
<th width="100">KODE MK</th>
<th width="350">NAMA MK</th>
<th width="50">SEMESTER</th>
<th width="50">SKS</th>
<th width="50">GRADE</th>
</tr>
</thead>
<tbody id="khs">
@foreach($mahasiswa as $row)
@php

$nilai = hitung_nilai($row->id);
$grade = hitung_grade($nilai);
$mutu = hitung_mutu($grade);

@endphp
<tr>

<td> $row->kode_mk </td>
<td> $row->nama_mk </td>
<td> $row->semester </td>
<td> $row->jml_sks</td>
<td> $grade </td>
<td> $mutu*$row->jml_sks </td>
</tr>
@php
$totalSKS=$totalSKS+$row->jml_sks;
$totalMutu = $totalMutu+$mutu*$row->jml_sks;
@endphp
@endforeach
</tbody>
</table>





Error, Undefined










share|improve this question






























    0















    I made an AJAX request so that when I select drop down the results will be out. I am confused. The problem is that only a table is displayed. How come the data comes from the variable $grade (calculation of grade), the variable $value (calculation of total value)?



    I try to get the element. $grade instead it is undefined






    <script type="text/javascript">
    $(document).ready(function()
    $('#kategori').on('change', function(e)
    var id = e.target.value;
    $.get('/khs/khs_semester/' + id, function(data)
    console.log(id);
    console.log(data);
    $('#khs').empty();
    $.each(data, function(index, element)
    $('#khs').append("<tr><td>" + element.kode_mk + "</td><td>" + element.nama_mk + "</td>" + "<td>" + element.semester + "</td><td>" + element.jml_sks + "</td><td>" + element.$grade + "</td></tr>");
    );
    );
    );
    );
    </script>

    <table class="table table-bordered">
    <thead>
    <tr>
    <th width="100">KODE MK</th>
    <th width="350">NAMA MK</th>
    <th width="50">SEMESTER</th>
    <th width="50">SKS</th>
    <th width="50">GRADE</th>
    </tr>
    </thead>
    <tbody id="khs">
    @foreach($mahasiswa as $row)
    @php

    $nilai = hitung_nilai($row->id);
    $grade = hitung_grade($nilai);
    $mutu = hitung_mutu($grade);

    @endphp
    <tr>

    <td> $row->kode_mk </td>
    <td> $row->nama_mk </td>
    <td> $row->semester </td>
    <td> $row->jml_sks</td>
    <td> $grade </td>
    <td> $mutu*$row->jml_sks </td>
    </tr>
    @php
    $totalSKS=$totalSKS+$row->jml_sks;
    $totalMutu = $totalMutu+$mutu*$row->jml_sks;
    @endphp
    @endforeach
    </tbody>
    </table>





    Error, Undefined










    share|improve this question


























      0












      0








      0








      I made an AJAX request so that when I select drop down the results will be out. I am confused. The problem is that only a table is displayed. How come the data comes from the variable $grade (calculation of grade), the variable $value (calculation of total value)?



      I try to get the element. $grade instead it is undefined






      <script type="text/javascript">
      $(document).ready(function()
      $('#kategori').on('change', function(e)
      var id = e.target.value;
      $.get('/khs/khs_semester/' + id, function(data)
      console.log(id);
      console.log(data);
      $('#khs').empty();
      $.each(data, function(index, element)
      $('#khs').append("<tr><td>" + element.kode_mk + "</td><td>" + element.nama_mk + "</td>" + "<td>" + element.semester + "</td><td>" + element.jml_sks + "</td><td>" + element.$grade + "</td></tr>");
      );
      );
      );
      );
      </script>

      <table class="table table-bordered">
      <thead>
      <tr>
      <th width="100">KODE MK</th>
      <th width="350">NAMA MK</th>
      <th width="50">SEMESTER</th>
      <th width="50">SKS</th>
      <th width="50">GRADE</th>
      </tr>
      </thead>
      <tbody id="khs">
      @foreach($mahasiswa as $row)
      @php

      $nilai = hitung_nilai($row->id);
      $grade = hitung_grade($nilai);
      $mutu = hitung_mutu($grade);

      @endphp
      <tr>

      <td> $row->kode_mk </td>
      <td> $row->nama_mk </td>
      <td> $row->semester </td>
      <td> $row->jml_sks</td>
      <td> $grade </td>
      <td> $mutu*$row->jml_sks </td>
      </tr>
      @php
      $totalSKS=$totalSKS+$row->jml_sks;
      $totalMutu = $totalMutu+$mutu*$row->jml_sks;
      @endphp
      @endforeach
      </tbody>
      </table>





      Error, Undefined










      share|improve this question
















      I made an AJAX request so that when I select drop down the results will be out. I am confused. The problem is that only a table is displayed. How come the data comes from the variable $grade (calculation of grade), the variable $value (calculation of total value)?



      I try to get the element. $grade instead it is undefined






      <script type="text/javascript">
      $(document).ready(function()
      $('#kategori').on('change', function(e)
      var id = e.target.value;
      $.get('/khs/khs_semester/' + id, function(data)
      console.log(id);
      console.log(data);
      $('#khs').empty();
      $.each(data, function(index, element)
      $('#khs').append("<tr><td>" + element.kode_mk + "</td><td>" + element.nama_mk + "</td>" + "<td>" + element.semester + "</td><td>" + element.jml_sks + "</td><td>" + element.$grade + "</td></tr>");
      );
      );
      );
      );
      </script>

      <table class="table table-bordered">
      <thead>
      <tr>
      <th width="100">KODE MK</th>
      <th width="350">NAMA MK</th>
      <th width="50">SEMESTER</th>
      <th width="50">SKS</th>
      <th width="50">GRADE</th>
      </tr>
      </thead>
      <tbody id="khs">
      @foreach($mahasiswa as $row)
      @php

      $nilai = hitung_nilai($row->id);
      $grade = hitung_grade($nilai);
      $mutu = hitung_mutu($grade);

      @endphp
      <tr>

      <td> $row->kode_mk </td>
      <td> $row->nama_mk </td>
      <td> $row->semester </td>
      <td> $row->jml_sks</td>
      <td> $grade </td>
      <td> $mutu*$row->jml_sks </td>
      </tr>
      @php
      $totalSKS=$totalSKS+$row->jml_sks;
      $totalMutu = $totalMutu+$mutu*$row->jml_sks;
      @endphp
      @endforeach
      </tbody>
      </table>





      Error, Undefined






      <script type="text/javascript">
      $(document).ready(function()
      $('#kategori').on('change', function(e)
      var id = e.target.value;
      $.get('/khs/khs_semester/' + id, function(data)
      console.log(id);
      console.log(data);
      $('#khs').empty();
      $.each(data, function(index, element)
      $('#khs').append("<tr><td>" + element.kode_mk + "</td><td>" + element.nama_mk + "</td>" + "<td>" + element.semester + "</td><td>" + element.jml_sks + "</td><td>" + element.$grade + "</td></tr>");
      );
      );
      );
      );
      </script>

      <table class="table table-bordered">
      <thead>
      <tr>
      <th width="100">KODE MK</th>
      <th width="350">NAMA MK</th>
      <th width="50">SEMESTER</th>
      <th width="50">SKS</th>
      <th width="50">GRADE</th>
      </tr>
      </thead>
      <tbody id="khs">
      @foreach($mahasiswa as $row)
      @php

      $nilai = hitung_nilai($row->id);
      $grade = hitung_grade($nilai);
      $mutu = hitung_mutu($grade);

      @endphp
      <tr>

      <td> $row->kode_mk </td>
      <td> $row->nama_mk </td>
      <td> $row->semester </td>
      <td> $row->jml_sks</td>
      <td> $grade </td>
      <td> $mutu*$row->jml_sks </td>
      </tr>
      @php
      $totalSKS=$totalSKS+$row->jml_sks;
      $totalMutu = $totalMutu+$mutu*$row->jml_sks;
      @endphp
      @endforeach
      </tbody>
      </table>





      <script type="text/javascript">
      $(document).ready(function()
      $('#kategori').on('change', function(e)
      var id = e.target.value;
      $.get('/khs/khs_semester/' + id, function(data)
      console.log(id);
      console.log(data);
      $('#khs').empty();
      $.each(data, function(index, element)
      $('#khs').append("<tr><td>" + element.kode_mk + "</td><td>" + element.nama_mk + "</td>" + "<td>" + element.semester + "</td><td>" + element.jml_sks + "</td><td>" + element.$grade + "</td></tr>");
      );
      );
      );
      );
      </script>

      <table class="table table-bordered">
      <thead>
      <tr>
      <th width="100">KODE MK</th>
      <th width="350">NAMA MK</th>
      <th width="50">SEMESTER</th>
      <th width="50">SKS</th>
      <th width="50">GRADE</th>
      </tr>
      </thead>
      <tbody id="khs">
      @foreach($mahasiswa as $row)
      @php

      $nilai = hitung_nilai($row->id);
      $grade = hitung_grade($nilai);
      $mutu = hitung_mutu($grade);

      @endphp
      <tr>

      <td> $row->kode_mk </td>
      <td> $row->nama_mk </td>
      <td> $row->semester </td>
      <td> $row->jml_sks</td>
      <td> $grade </td>
      <td> $mutu*$row->jml_sks </td>
      </tr>
      @php
      $totalSKS=$totalSKS+$row->jml_sks;
      $totalMutu = $totalMutu+$mutu*$row->jml_sks;
      @endphp
      @endforeach
      </tbody>
      </table>






      javascript ajax laravel






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 25 at 15:01









      Derk Jan Speelman

      3,2401 gold badge13 silver badges30 bronze badges




      3,2401 gold badge13 silver badges30 bronze badges










      asked Mar 25 at 13:26









      Khaiz Badaru TammamKhaiz Badaru Tammam

      231 silver badge8 bronze badges




      231 silver badge8 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          0














          What might help you is to identify each row by an ID, it could be an ID in the <tr id="KM003"> or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code like: var Name = $('#IDused').innerHTML;



          If you use by the ROW approach, you could use a class in each child TD to identify the attribute, for example:



          <tr id="km003">
          <td class="kode"> $row->kode_mk </td>
          <td class="nama"> $row->nama_mk </td>
          <td class="semester"> $row->semester </td>
          <td class="jml_sks"> $row->jml_sks</td>
          <td class="grade"> $grade </td>
          </tr>


          and then you could get the value by var grade = $("#km003 .grade").innerHTML;






          share|improve this answer

























          • sorry, where is it put? i don't understand ajax

            – Khaiz Badaru Tammam
            Mar 25 at 13:52











          • @KhaizBadaruTammam this is JQuery basically, what you want to do is to identify each row by an ID, it could be an ID in the <tr id="KM003">or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code...

            – MonneratRJ
            Mar 25 at 13:58












          • If you use by the ROW, like the first example, you could use a class in each child TD to identify the attribute, for example: <tr id="km003"> ` <td class="kode"> $row->kode_mk </td>` ` <td class="nama"> $row->nama_mk </td>` ` <td class="semester"> $row->semester </td>` ` <td class="jml_sks"> $row->jml_sks</td>` ` <td class="grade"> $grade </td><br />` </tr>

            – MonneratRJ
            Mar 25 at 14:02












          • im having trouble to indent the code here, but basically after you use an id to the row, you could acess by JQuery using $('#km003 .grade).innerHTML;

            – MonneratRJ
            Mar 25 at 14:11











          • a nice and fast way to find out if the code is ok, if it works, is using the google devtools, Ctrl+Shift+I to open and you can type on console

            – MonneratRJ
            Mar 25 at 14:13










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55338887%2fhow-do-i-take-variables-in-javascript%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          What might help you is to identify each row by an ID, it could be an ID in the <tr id="KM003"> or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code like: var Name = $('#IDused').innerHTML;



          If you use by the ROW approach, you could use a class in each child TD to identify the attribute, for example:



          <tr id="km003">
          <td class="kode"> $row->kode_mk </td>
          <td class="nama"> $row->nama_mk </td>
          <td class="semester"> $row->semester </td>
          <td class="jml_sks"> $row->jml_sks</td>
          <td class="grade"> $grade </td>
          </tr>


          and then you could get the value by var grade = $("#km003 .grade").innerHTML;






          share|improve this answer

























          • sorry, where is it put? i don't understand ajax

            – Khaiz Badaru Tammam
            Mar 25 at 13:52











          • @KhaizBadaruTammam this is JQuery basically, what you want to do is to identify each row by an ID, it could be an ID in the <tr id="KM003">or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code...

            – MonneratRJ
            Mar 25 at 13:58












          • If you use by the ROW, like the first example, you could use a class in each child TD to identify the attribute, for example: <tr id="km003"> ` <td class="kode"> $row->kode_mk </td>` ` <td class="nama"> $row->nama_mk </td>` ` <td class="semester"> $row->semester </td>` ` <td class="jml_sks"> $row->jml_sks</td>` ` <td class="grade"> $grade </td><br />` </tr>

            – MonneratRJ
            Mar 25 at 14:02












          • im having trouble to indent the code here, but basically after you use an id to the row, you could acess by JQuery using $('#km003 .grade).innerHTML;

            – MonneratRJ
            Mar 25 at 14:11











          • a nice and fast way to find out if the code is ok, if it works, is using the google devtools, Ctrl+Shift+I to open and you can type on console

            – MonneratRJ
            Mar 25 at 14:13















          0














          What might help you is to identify each row by an ID, it could be an ID in the <tr id="KM003"> or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code like: var Name = $('#IDused').innerHTML;



          If you use by the ROW approach, you could use a class in each child TD to identify the attribute, for example:



          <tr id="km003">
          <td class="kode"> $row->kode_mk </td>
          <td class="nama"> $row->nama_mk </td>
          <td class="semester"> $row->semester </td>
          <td class="jml_sks"> $row->jml_sks</td>
          <td class="grade"> $grade </td>
          </tr>


          and then you could get the value by var grade = $("#km003 .grade").innerHTML;






          share|improve this answer

























          • sorry, where is it put? i don't understand ajax

            – Khaiz Badaru Tammam
            Mar 25 at 13:52











          • @KhaizBadaruTammam this is JQuery basically, what you want to do is to identify each row by an ID, it could be an ID in the <tr id="KM003">or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code...

            – MonneratRJ
            Mar 25 at 13:58












          • If you use by the ROW, like the first example, you could use a class in each child TD to identify the attribute, for example: <tr id="km003"> ` <td class="kode"> $row->kode_mk </td>` ` <td class="nama"> $row->nama_mk </td>` ` <td class="semester"> $row->semester </td>` ` <td class="jml_sks"> $row->jml_sks</td>` ` <td class="grade"> $grade </td><br />` </tr>

            – MonneratRJ
            Mar 25 at 14:02












          • im having trouble to indent the code here, but basically after you use an id to the row, you could acess by JQuery using $('#km003 .grade).innerHTML;

            – MonneratRJ
            Mar 25 at 14:11











          • a nice and fast way to find out if the code is ok, if it works, is using the google devtools, Ctrl+Shift+I to open and you can type on console

            – MonneratRJ
            Mar 25 at 14:13













          0












          0








          0







          What might help you is to identify each row by an ID, it could be an ID in the <tr id="KM003"> or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code like: var Name = $('#IDused').innerHTML;



          If you use by the ROW approach, you could use a class in each child TD to identify the attribute, for example:



          <tr id="km003">
          <td class="kode"> $row->kode_mk </td>
          <td class="nama"> $row->nama_mk </td>
          <td class="semester"> $row->semester </td>
          <td class="jml_sks"> $row->jml_sks</td>
          <td class="grade"> $grade </td>
          </tr>


          and then you could get the value by var grade = $("#km003 .grade").innerHTML;






          share|improve this answer















          What might help you is to identify each row by an ID, it could be an ID in the <tr id="KM003"> or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code like: var Name = $('#IDused').innerHTML;



          If you use by the ROW approach, you could use a class in each child TD to identify the attribute, for example:



          <tr id="km003">
          <td class="kode"> $row->kode_mk </td>
          <td class="nama"> $row->nama_mk </td>
          <td class="semester"> $row->semester </td>
          <td class="jml_sks"> $row->jml_sks</td>
          <td class="grade"> $grade </td>
          </tr>


          and then you could get the value by var grade = $("#km003 .grade").innerHTML;







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 25 at 14:56

























          answered Mar 25 at 13:30









          MonneratRJMonneratRJ

          1349 bronze badges




          1349 bronze badges












          • sorry, where is it put? i don't understand ajax

            – Khaiz Badaru Tammam
            Mar 25 at 13:52











          • @KhaizBadaruTammam this is JQuery basically, what you want to do is to identify each row by an ID, it could be an ID in the <tr id="KM003">or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code...

            – MonneratRJ
            Mar 25 at 13:58












          • If you use by the ROW, like the first example, you could use a class in each child TD to identify the attribute, for example: <tr id="km003"> ` <td class="kode"> $row->kode_mk </td>` ` <td class="nama"> $row->nama_mk </td>` ` <td class="semester"> $row->semester </td>` ` <td class="jml_sks"> $row->jml_sks</td>` ` <td class="grade"> $grade </td><br />` </tr>

            – MonneratRJ
            Mar 25 at 14:02












          • im having trouble to indent the code here, but basically after you use an id to the row, you could acess by JQuery using $('#km003 .grade).innerHTML;

            – MonneratRJ
            Mar 25 at 14:11











          • a nice and fast way to find out if the code is ok, if it works, is using the google devtools, Ctrl+Shift+I to open and you can type on console

            – MonneratRJ
            Mar 25 at 14:13

















          • sorry, where is it put? i don't understand ajax

            – Khaiz Badaru Tammam
            Mar 25 at 13:52











          • @KhaizBadaruTammam this is JQuery basically, what you want to do is to identify each row by an ID, it could be an ID in the <tr id="KM003">or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code...

            – MonneratRJ
            Mar 25 at 13:58












          • If you use by the ROW, like the first example, you could use a class in each child TD to identify the attribute, for example: <tr id="km003"> ` <td class="kode"> $row->kode_mk </td>` ` <td class="nama"> $row->nama_mk </td>` ` <td class="semester"> $row->semester </td>` ` <td class="jml_sks"> $row->jml_sks</td>` ` <td class="grade"> $grade </td><br />` </tr>

            – MonneratRJ
            Mar 25 at 14:02












          • im having trouble to indent the code here, but basically after you use an id to the row, you could acess by JQuery using $('#km003 .grade).innerHTML;

            – MonneratRJ
            Mar 25 at 14:11











          • a nice and fast way to find out if the code is ok, if it works, is using the google devtools, Ctrl+Shift+I to open and you can type on console

            – MonneratRJ
            Mar 25 at 14:13
















          sorry, where is it put? i don't understand ajax

          – Khaiz Badaru Tammam
          Mar 25 at 13:52





          sorry, where is it put? i don't understand ajax

          – Khaiz Badaru Tammam
          Mar 25 at 13:52













          @KhaizBadaruTammam this is JQuery basically, what you want to do is to identify each row by an ID, it could be an ID in the <tr id="KM003">or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code...

          – MonneratRJ
          Mar 25 at 13:58






          @KhaizBadaruTammam this is JQuery basically, what you want to do is to identify each row by an ID, it could be an ID in the <tr id="KM003">or in the specific TD of the grade, like <td id="KM003Grade"> so you could get the grade by the students code...

          – MonneratRJ
          Mar 25 at 13:58














          If you use by the ROW, like the first example, you could use a class in each child TD to identify the attribute, for example: <tr id="km003"> ` <td class="kode"> $row->kode_mk </td>` ` <td class="nama"> $row->nama_mk </td>` ` <td class="semester"> $row->semester </td>` ` <td class="jml_sks"> $row->jml_sks</td>` ` <td class="grade"> $grade </td><br />` </tr>

          – MonneratRJ
          Mar 25 at 14:02






          If you use by the ROW, like the first example, you could use a class in each child TD to identify the attribute, for example: <tr id="km003"> ` <td class="kode"> $row->kode_mk </td>` ` <td class="nama"> $row->nama_mk </td>` ` <td class="semester"> $row->semester </td>` ` <td class="jml_sks"> $row->jml_sks</td>` ` <td class="grade"> $grade </td><br />` </tr>

          – MonneratRJ
          Mar 25 at 14:02














          im having trouble to indent the code here, but basically after you use an id to the row, you could acess by JQuery using $('#km003 .grade).innerHTML;

          – MonneratRJ
          Mar 25 at 14:11





          im having trouble to indent the code here, but basically after you use an id to the row, you could acess by JQuery using $('#km003 .grade).innerHTML;

          – MonneratRJ
          Mar 25 at 14:11













          a nice and fast way to find out if the code is ok, if it works, is using the google devtools, Ctrl+Shift+I to open and you can type on console

          – MonneratRJ
          Mar 25 at 14:13





          a nice and fast way to find out if the code is ok, if it works, is using the google devtools, Ctrl+Shift+I to open and you can type on console

          – MonneratRJ
          Mar 25 at 14:13






          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55338887%2fhow-do-i-take-variables-in-javascript%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현