Book Image

Learning Ext JS_Fourth Edition

Book Image

Learning Ext JS_Fourth Edition

Overview of this book

Table of Contents (22 chapters)
Learning Ext JS Fourth Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Ajax


Before we start learning about the data package it's important to know how we can make an Ajax request to the server. The Ajax request is one of the most useful ways to get data from the server asynchronously. This means that the JavaScript loop is not blocked while the request is being executed and an event will be fired when the server responds; this allows us to do anything else while the request is being performed.

If you are new to Ajax, I recommend you read more about it. There are thousands of tutorials online, but I suggest you read this simple article at https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started.

Ext JS provides a singleton object (Ext. Ajax) that is responsible for dealing with all the required processes to perform a request in any browser. There are a few differences in each browser, but Ext JS handles these differences for us and gives us a cross browser solution to make Ajax requests.

Let's make our first Ajax call to our server. First, we will need to...