Kasuni Abegunawardana

Kasuni Abegunawardana

  • NA
  • 211
  • 124.5k

How to update Array and Display in a Table in javascript

May 14 2018 2:36 AM
 I have successfully created updating part but I don't know how to display it in a table again
  1. //Update the students  
  2. function EditRecords() {  
  3. var RegNumberText = document.getElementById("textboxRegistrationNumber");  
  4. _students[_selectedStudentIndex].RegNum = RegNumberText.value;  
  5. var FullNameText = document.getElementById("textboxfirstname");  
  6. _students[_selectedStudentIndex].FullName = FullNameText.value;  
  7. var LastNameText = document.getElementById("textboxlastname");  
  8. _students[_selectedStudentIndex].LastName = LastNameText.value;  
  9. var EmailAddressText = document.getElementById("textboxemail");  
  10. _students[_selectedStudentIndex].Email = EmailAddressText.value;  
  11. var PhoneNumberText = document.getElementById("textboxphonenumber");  
  12. _students[_selectedStudentIndex].PhoneNumber = PhoneNumberText.value;  
  13. console.log(_students);  
  14. }  

Answers (1)