11.07.2015 Views

AJAX and PHP

AJAX and PHP

AJAX and PHP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}throw(response.length == 0 ? "Server error" : response);// obtain a reference to the element on the pagemyDiv = document.getElementById("myDivElement");// display the HTML outputmyDiv.innerHTML += "New r<strong>and</strong>om number retrieved from server: "+ response + "";// increase requests countrequestsCounter++;// reinitiate sequencessetTimeout("process();", updateInterval * 1000);Chapter 34. In the same folder, create smartproxyping.php:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!