Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook
Lesson 2: Working with web services CHAPTER 8 379 $(document).ready(function () { $('#btnAdd').on('click', addNumbers) $('#btnSu ...
380 CHAPTER 8 Websites and services function serverDivision(data) { return $.ajax({ url: '/divide', data: data, type: 'DELETE', ...
Lesson 2: Working with web services CHAPTER 8 381 This example allows anyone to access the web service, but that could open the ...
382 CHAPTER 8 Websites and services Lesson review Answer the following questions to test your knowledge of the information in th ...
Practice exercises CHAPTER 8 383 project. From the Node.js perspective, all the files are in its website, but you can still open ...
384 CHAPTER 8 Websites and services “formidable”: “1.x”, “express”: “3.0.0” } } Install the dependent packages by typing the fo ...
Practice exercises CHAPTER 8 385 If you see a pop-up prompt stating that Windows Firewall has blocked some features, as shown i ...
386 CHAPTER 8 Websites and services The modified <form> element should look like the following. <form name="ContactForm ...
Practice exercises CHAPTER 8 387 }); app.post('/ContactMessage', function (request, response) { var form = new formidable.Incomi ...
388 CHAPTER 8 Websites and services <script src=”Scripts/jquery-1.8.2.js”></script> <script src=”Scripts/ContactU ...
Practice exercises CHAPTER 8 389 In the ContactUs.js file, add a callServer function that uses jQuery to make an AJAX call that ...
390 CHAPTER 8 Websites and services FIGURE 8-15 he submitted form displaying a message on the same pageT Suggested practice exer ...
Answers CHAPTER 8 391 Answers This section contains the answers to the lesson review questions in this chapter. Lesson 1 Correc ...
392 CHAPTER 8 Websites and services Correct answer: A A. Correct: XMLHttpRequest is used to make AJAX calls. B. Incorrect: Ajax ...
393 Chapter 9 Asynchronous operations CHAPTER 9 Asynchronous operations H ave you ever run an application and had the screen fre ...
394 CHAPTER 9 Asynchronous operations This lesson focuses on jQuery’s deferred and promise objects for controlling execution of ...
Lesson 1: Asynchronous operations using jQuery and WinJS CHAPTER 9 395 function fetchAjaxAsync(url, callback, errorCallback) { v ...
396 CHAPTER 9 Asynchronous operations FIGURE 9-1 he Deferred and Promise objectsT The following is an example of using the $.Def ...
Lesson 1: Asynchronous operations using jQuery and WinJS CHAPTER 9 397 function can use to add more code to execute on completio ...
398 CHAPTER 9 Asynchronous operations “always!” message before the “done!” or “failed!” message because the always subscription ...
«
16
17
18
19
20
21
22
23
24
25
»
Free download pdf