WebFund 2015W Lecture 15
Video
The video from the lecture given on March 4, 2015 is now available.
Code
persistent-notes/public/javascripts/notes.js
$(function() {
$.getJSON("/testdata", function(data) {
$("#otheruser").text("Or is it " + data.username + "?");
});
});
Notes
From Lecture:
AJAX ---- Asynchronous JavaScript And XML more AJAJ (XML => JSON) Old JavaScript just ran in response to local events - timer - mouse, keyboard - on page load AJAX allows background processing, particularly of network communication - do GETs and POSTs in the background Allows for "single page" web apps XMLHttpRequest - originally an ActiveX object - now native - written by Microsoft for Outlook Web Access jQuery provides nicer interfaces to XMLHttpRequest * $.getJSON() * $.post() Arguments: - URL (path on the server) - callback