So it's time to move past theory and demonstrate with a functional code sample how to accomplish the aforementioned task. Thus, below I have rewritten the client-side part of the Ajax application built in the prior section, which this time uses the jQuery library. Here it is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Reading file contents with jQuery library (uses Google API)</title>
font: bold 18pt Arial, Helvetica, sans-serif;
border: 1px solid #999;
font: normal 10pt Arial, Helvetica, sans-serif;
// load jQuery library with Google API (loads uncompressed source file)
<h1 id="header">Reading file contents with jQuery library (uses Google API)</h1>
<p><input type="button" id="btn" value="Read File Now!" /></p>
Definitely, understanding how to serve the different libraries via the Google API without using compression is a no-brainer process that doesn’t require any further explanations. Therefore, in the final part of this tutorial I’ll be listing for you the complete source code corresponding to the Ajax program built earlier, so you can tweak and test it more easily.
Click on the following link and proceed to read the final section, please.
blog comments powered by Disqus