Filtering the table column in ajax

Wednesday, November 4, 2015

Here is the code named as tutorial.js I have written to display the table present on the server.



window.onload = function () {
var greeting = document.createElement("span");
greeting.style.backgroundColor = "yellow";
greeting.innerHTML = "Hello World!";
$("sandbox").appendChild(greeting);

$("sandbox").appendChild(document.createElement("hr"));

var link = document.createElement("a");
link.href = "https://gryphon.rnet.missouri.edu/authtest";
link.appendChild(document.createTextNode("Administrator Only"));
$("sandbox").appendChild(link);
}

function $(id) {
return document.getElementById(id);
}


Now I have to filter the specific say second column of the table by adding the condition that it will display only those users whose institution matches with mine one.



The table has the following header, which is displayed after clicking on the particular radio button for displaying all the users.:



index username institution name



Please help me how to write the code to filter the column name to display all users whose institution name matches with mine one. I will greatly appreciate.

0 comments:

Post a Comment