Below is a HTML fragment that you could include in a web page to include recent articles titles for the person id Newman-D-K based on the JSON version of the feed.
<div id="recent-articles">
Recent articles go here if JavaScript worked!
</div>
<script src="https://feeds.library.caltech.edu/scripts/CL.js"></script>
<script>
let recent_articles = document.getElementById("recent-articles");
CL.getPeopleJSON("Newman-D-K", "recent/article", function(articles, err) {
if (err != "") {
console.log("ERROR", err);
return;
}
articles.forEach(function(article) {
var elem = document.createElement("div"),
h1 = document.createElement("h1"),
anchor = document.createElement("a"),
div = document.createElement("div");
/* Setup to style our elements with CSS classes */
elem.classList.add("article");
h1.classList.add("article-title");
div.classList.add("article-abstract");
/* Not layout our data in our elements */
anchor.setAttribute("href", article.official_url);
anchor.innerHTML = article.title;
h1.appendChild(anchor);
div.innerHTML = article.abstract;
elem.appendChild(h1);
elem.appendChild(div);
/* Finally add our composit element to the list */
recent_articles.appendChild(elem)
});
});
</script>That example is rendered below–
See Recent Articles go here if JavaScript worked!