This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA
This is the plain vanilla look.
be vigilant
example ratemyarea.com
<select id="review-rating" name="review-rating">
function selectReplacement(obj) { obj.className += ' replaced'; var ul = document.createElement('ul'); ul.className = 'selectReplacement'; var opts = obj.getElementsByTagName('option'); for (var i=0; i
ajax ajax
behave
ajax xmlhttprequest
example rapha.cc
communicating with the server without refreshing the whole page.
hijax
progressive enhancement xmlhttprequest
document.getElementById('product-form').onsubmit = function() { var data = ''; for (var i=0; i
var request = new XMLHttpRequest(); request.open('POST', 'basket-update.php', true);
request.onreadystatechange = function() { if (this.readystate == 4) {
request.setRequestHeader(
if (this.status == 200) {
'Content-Type', 'application/x-www-form-urlencoded'
document.getElementById('basket').innerHTML = this.responseText;
); request.send(data);
} } }
beyond the browser
what’s happening? what happened? the back button bookmarking