Rich Internet Applications 4 Ajax What is Ajax

  • Slides: 63
Download presentation
Rich Internet Applications 4. Ajax

Rich Internet Applications 4. Ajax

What is Ajax? l l Asynchronous Java. Script and XML Term coined in 2005

What is Ajax? l l Asynchronous Java. Script and XML Term coined in 2005 by Jesse James Garrett l l l http: //www. adaptivepath. com/ideas/essays/archives /000385. php Ajax isn’t really new, and isn’t a single technology “It’s really several technologies, each flourishing in its own right, coming together in powerful new ways. ” Rich Internet Applications 4. Ajax #2

Defining AJAX l Ajax incorporates: l l l standards-based presentation using XHTML and CSS

Defining AJAX l Ajax incorporates: l l l standards-based presentation using XHTML and CSS dynamic display and interaction using the DOM data interchange and manipulation using XML and XSLT asynchronous data retrieval using XMLHttp. Request and Java. Script binding everything together. Rich Internet Applications 4. Ajax #3

Classic web application model Rich Internet Applications 4. Ajax #4

Classic web application model Rich Internet Applications 4. Ajax #4

Ajax web application model Rich Internet Applications 4. Ajax #5

Ajax web application model Rich Internet Applications 4. Ajax #5

“Raw” Ajax l l Even if you are using an Ajax toolkit it is

“Raw” Ajax l l Even if you are using an Ajax toolkit it is important to understand the underlying architecture Raw Ajax involves programming in Java. Script to: l l use the XMLHttp. Request write callback functions to handle response write code to update the DOM use only the native browser DOM and Java. Script support Rich Internet Applications 4. Ajax #6

Standard HTTP request l Sent by browser when: l l l URL entered in

Standard HTTP request l Sent by browser when: l l l URL entered in address bar Bookmark/favourite selected Hyperlink in page clicked Loading page refers to linked resources Uses HTTP protocol Response replaces currently displayed page unless it is a linked resource Rich Internet Applications 4. Ajax #7

XMLHttp. Request l XMLHttp. Request is a scriptable DOM object l l sent by

XMLHttp. Request l XMLHttp. Request is a scriptable DOM object l l sent by script running in browser typically sent by Java. Script event handler function Uses HTTP protocol Response returned to script l l Can be XML, but doesn’t have to be does not cause browser to refresh page script controls what is done with response data typically used to modify DOM of currently displayed page Rich Internet Applications 4. Ajax #8

XMLHttp. Request history l l l Originally developed by Microsoft in IE 5 for

XMLHttp. Request history l l l Originally developed by Microsoft in IE 5 for Outlook Web Access 2000 The Microsoft implementation is an Active. X object called XMLHTTP Native DOM implementation in Mozilla 1. 0 in 2002 Most browsers, including IE 7+, now natively support XMLHttp. Request W 3 C draft standard, April 2008 Rich Internet Applications 4. Ajax #9

Creating an XMLHttp. Request l Create a new object within a script req =

Creating an XMLHttp. Request l Create a new object within a script req = new XMLHttp. Request(); l For the benefit of older versions of IE, need to create an Active. X object if native object is not supported if (window. XMLHttp. Request) { req = new XMLHttp. Request(); } else if (window. Active. XObject) { req = new Active. XObject("Microsoft. XMLHTTP"); } Rich Internet Applications 4. Ajax #10

Setting up an XMLHttp. Request l l Need to specify URL and method for

Setting up an XMLHttp. Request l l Need to specify URL and method for the HTTP request which will be sent URL is the resource which returns the information required l l Can be a file or a server script Not usually a complete XHTML document var url = "textdestinations. txt"; req = new XMLHttp. Request(); req. open("GET", url, true); true specifies that request is asynchronous false would cause script to wait for response Rich Internet Applications 4. Ajax #11

Ready states and callback functions l l Script needs to know when a response

Ready states and callback functions l l Script needs to know when a response has been received XMLHttp. Request object generates an event to report on its progress l l l onreadystatechange event ready. State property ready. State can have values from 0 to 4 Event is fired when ready. State changes Define callback function to handle event Rich Internet Applications 4. Ajax #12

XMLHttp. Request ready states 0: The request is uninitialized (before you've called open()) 1:

XMLHttp. Request ready states 0: The request is uninitialized (before you've called open()) 1: The request is set up, but not sent (before you've called send()) 2: The request was sent and is in process 3: The request is in process; often some partial data is available from the response, but the server isn't finished with its response 4: The response is complete; you can get the server's response and use it Rich Internet Applications 4. Ajax #13

Defining a callback function l Register event handler (using traditional model): req. onreadystatechange =

Defining a callback function l Register event handler (using traditional model): req. onreadystatechange = get. Destinations. Call. Back; l Write callback function: function get. Destinations. Call. Back() { // event handling code. . . } Rich Internet Applications 4. Ajax #14

Ajax example var req; get. Destinations handles the onload function get. Destinations() { event

Ajax example var req; get. Destinations handles the onload function get. Destinations() { event of the window var url = “/Static. Data/destinations. txt"; req = new XMLHttp. Request(); req. open("GET", url, true); req. onreadystatechange = get. Destinations. Call. Back; req. send(null); don’t do anything unless ready. State has } reached 4 as data may not be available function get. Destinations. Call. Back() { don’t do anything unless status is 200 if (req. ready. State == 4) { which indicates a successful response if (req. status == 200) { document. get. Element. By. Id( 'destinationlist' ). inner. HTML = req. response. Text; } } } this example replaces the inner. HTML window. onload = get. Destinations; . . . property of the specified XHTML element <body> with the content of the response <h 3>Dynamically Populating a List</h 3> <div id="destinationlist">  </div> </body> Rich Internet Applications 4. Ajax #15

Ajax example in action l Response contains an HTML snippet representing a list destinations.

Ajax example in action l Response contains an HTML snippet representing a list destinations. txt – contents <ul> <li>USA</li> <li>Asia</li> <li>Europe</li> <li>Australia</li> </ul> Rich Internet Applications 4. Ajax #16

Examining an XMLHttp. Request l Firefox with Firebug lets you examine request and response

Examining an XMLHttp. Request l Firefox with Firebug lets you examine request and response headers and response body Rich Internet Applications 4. Ajax #17

Ajax patterns l This example used the following techniques: l l l Xml. Http.

Ajax patterns l This example used the following techniques: l l l Xml. Http. Request to get data HTML formatting for the data These techniques are examples of Ajax patterns A pattern is a general reusable solution to a commonly occurring problem Description or template for how to solve a problem that can be used in many different situations Rich Internet Applications 4. Ajax #18

About Ajax patterns l l l Ajaxpatterns. org Book: Ajax Design Patterns by Michael

About Ajax patterns l l l Ajaxpatterns. org Book: Ajax Design Patterns by Michael Mahemoff Types of patterns: l l Foundational Technology patterns Programming patterns Functionality and Usability patterns Development Practices Rich Internet Applications 4. Ajax #19

Pattern contents l l l l Developer/Goal story Problem Forces Solution Decisions Examples Alternatives

Pattern contents l l l l Developer/Goal story Problem Forces Solution Decisions Examples Alternatives Related patterns Rich Internet Applications 4. Ajax #20

Patterns used so far l Foundational Technology Patterns l Web Remoting l l Xml.

Patterns used so far l Foundational Technology Patterns l Web Remoting l l Xml. Http. Request Call Programming Patterns l Web Services l HTML Message Rich Internet Applications 4. Ajax #21

HTML Message pattern l Developer Story l l Dave's identified the need for a

HTML Message pattern l Developer Story l l Dave's identified the need for a credit history service, providing a list of transactions. Java. Script resources are limited, so the entire HTML is created server side, and the browser application has only to morph a DOM element with the entire HTML response Problem l What format should be used for server responses? Rich Internet Applications 4. Ajax #22

HTML Message pattern l Forces l l l The browser display needs to be

HTML Message pattern l Forces l l l The browser display needs to be dynamic The display changes by altering the DOM, and HTML is often used to specify the new value. The nature of the change is often complex and needs to be determined server side. Not all developers know Java. Script, and many feel its usage is best minimized. Solution l Have the server generate HTML snippets to be displayed in the browser. . Rich Internet Applications 4. Ajax #23

Related patterns l HTML Message is one of several possible ways of formatting data

Related patterns l HTML Message is one of several possible ways of formatting data to be returned by a request: l Programming Patterns l Web Services § § § l XML Message JSON Message Plain-Text Message Similarly, Xml. Http. Request. Call is one of several possible ways of getting the data - we will look at alternatives later on Rich Internet Applications 4. Ajax #24

Related patterns l l l We have seen that the page contents can be

Related patterns l l l We have seen that the page contents can be modified by manipulating the DOM This relates to the following patterns: Foundational Technology Patterns l Display Manipulation l l Display Morphing Page Rearrangement Rich Internet Applications 4. Ajax #25

XML l l The Extensible Markup Language (XML) is a general-purpose specification for creating

XML l l The Extensible Markup Language (XML) is a general-purpose specification for creating custom markup languages Allows its users to define their own elements Its primary purpose is to help information systems share structured data XML document is a text document which marks elements with tags enclosed in <> brackets Rich Internet Applications 4. Ajax #26

Simple XML example <? xml version="1. 0" encoding="UTF-8"? > <destinations company=“gcutours”> <destination>USA</destination> <destination>Asia</destination> <destination>Europe</destination>

Simple XML example <? xml version="1. 0" encoding="UTF-8"? > <destinations company=“gcutours”> <destination>USA</destination> <destination>Asia</destination> <destination>Europe</destination> <destination>Australia</destination> </destinations> element destinations defined by opening and closing tags – tags must be properly closed optional XML declaration destinations element has an attribute destination elements have content destination elements nested inside destinations elements with no content or nested elements can be self-closing, e. g. <customer name=“Jim”/> Rich Internet Applications 4. Ajax #27

XML rules l l All tags must have closing tags or be selfclosing Tags

XML rules l l All tags must have closing tags or be selfclosing Tags are case sensitive, and must be properly nested A document which conforms to the XML syntax rules is called well-formed Can optionally specify document type definition or schema to validate structure of XML document Rich Internet Applications 4. Ajax #28

XML Message pattern l Forces l l Problem l l Ajax Apps require messages

XML Message pattern l Forces l l Problem l l Ajax Apps require messages to be transmitted back and forth Both browser and the server must be able to access the message. That usually means the format must be easily accessed in Java. Script as well as whichever server-side language is used The server application should not be tied to the client-side display as the message may be used by other applications How can you transfer data between server and browser? Solution l Pass messages between server and browser in XML format. . . Rich Internet Applications 4. Ajax #29

XML Message example var req; get. Destinations is much the function get. Destinations() {

XML Message example var req; get. Destinations is much the function get. Destinations() { as before except for the URL var url = "textdestinations. xml"; req = new XMLHttp. Request(); req. open("GET", url, true); req. onreadystatechange = get. Destinations. Call. Back; req. send(null); } same function get. Destinations. Call. Back() {. . . } this time we will use the data to add. . . <body on. Load="get. Destinations()"> options to a drop-down select box – the <h 3>Dynamically Populating a List</h 3> select box has no options to start with <form name="destinationform"> <p>Select a destination : </p> <p><select id="destinationlist"></select></p> </form> </body> Rich Internet Applications 4. Introduction to Ajax #30

XML Message example parse response and construct an XML document in memory function get.

XML Message example parse response and construct an XML document in memory function get. Destinations. Call. Back() { if (req. ready. State == 4) { destinations is an array of the destination if (req. status == 200) { elements in the XML document var xml. Doc = req. response. XML; var destinations = xml. Doc. get. Elements. By. Tag. Name("destination"); dest. Select = document. get. Element. By. Id("destinationlist"); for (i=0; i<destinations. length; i++){ dest. Select is the select value = destinations[i]. child. Nodes[0]. node. Value; box in the XHTML page text = value; if (dest. Select != null && dest. Select. options != null) this syntax is needed to get { dest. Select. options[dest. Select. options. length] = the value of each destination new Option(text, value, false, true); element in the XML } } dest. Select. options[0]. selected = true; this adds a new option to the } dest. Select box – displayed text and } value are the same } Rich Internet Applications 4. Ajax #31

Java. Script and XML l l l XML data is represented as a live

Java. Script and XML l l l XML data is represented as a live XML document has its own DOM similar to browser DOM Need to use Java. Script DOM functions and traverse nodes to extract information var destinations = xml. Doc. get. Elements. By. Tag. Name("destination"); value = destinations[i]. child. Nodes[0]. node. Value; l Can become tricky with complex data Rich Internet Applications 4. Ajax #32

JSON l l JSON (Java. Script Object Notation) is a lightweight data interchange format

JSON l l JSON (Java. Script Object Notation) is a lightweight data interchange format Text-based, human-readable format for representing simple data structures and associative arrays (called objects) Based on Java. Script literal syntax but can be used by other programming languages JSON data can be understood natively by Java. Script without having to access a DOM Rich Internet Applications 4. Ajax #33

Java. Script literals l l l Java. Script allows variables to be created by

Java. Script literals l l l Java. Script allows variables to be created by specifying literal values, with no type declaration Simplest case is a single numeric or string value Can create arrays and arbitrarily complex structured objects Rich Internet Applications 4. Ajax #34

Java. Script literals l Examples: var my. Value = “value”; var my. Array =

Java. Script literals l Examples: var my. Value = “value”; var my. Array = [“value 1”, “value 2”, “value 3”]; var my. Object = {“member 1”: “value” , “member 2”: “value”} l Combine these to get complex objects: var my. Complex. Object 1 = [ array of objects {“member 1”: “value” , “member 2”: “value”}, {“member 1”: “value” , “member 2”: “value”} ]; var my. Complex. Object 2 = { object with an array as a member {“member 1”: “value”}, {“member 2”: [“value 1”, “value 2”, “value 3”] } }; Rich Internet Applications 4. Ajax #35

JSON structures Rich Internet Applications 4. Ajax #36

JSON structures Rich Internet Applications 4. Ajax #36

JSON and XML compared XML <destinations> <destination>USA</destination> <destination>Asia</destination> <destination>Europe</destination> <destination>Australia</destination> </destinations> JSON ["Asia", "Australia",

JSON and XML compared XML <destinations> <destination>USA</destination> <destination>Asia</destination> <destination>Europe</destination> <destination>Australia</destination> </destinations> JSON ["Asia", "Australia", "Europe", "South America", "USA"] Rich Internet Applications 4. Ajax #37

JSON and XML compared XML <packages> <package> <name>Western Adventure</name> <description>A typical tour is our

JSON and XML compared XML <packages> <package> <name>Western Adventure</name> <description>A typical tour is our Western Adventure. . . </description> <tourpicurl>images/western. jpg</tourpicurl> </package> <name>Roof of the World Explorer</name> <description>New this year is our Roof of the World tour. . . </description> <tourpicurl>images/roofoftheworld. jpg</tourpicurl> </package> <packages> Rich Internet Applications 4. Ajax #38

JSON and XML compared JSON [ { "name": "Western Adventure", "description": "A typical tour

JSON and XML compared JSON [ { "name": "Western Adventure", "description": "A typical tour is our Western Adventure tour. . ", "tourpicurl": "images/western. jpg" }, { "name": "Roof of the World Explorer", "description": "New this year is our Roof of the World tour. . . ", "tourpicurl": "images/roofoftheworld. jpg" } ] See http: //www. json. org/example. html for more examples Rich Internet Applications 4. Ajax #39

JSON Message pattern l Forces l l Problem l l Ajax Apps require messages

JSON Message pattern l Forces l l Problem l l Ajax Apps require messages to be transmitted back and forth Both browser and the server must be able to access the message. That usually means the format must be easily accessed in Java. Script as well as whichever server-side language is used The server application should not be tied to the client-side display as the message may be used by other applications How can you transfer data between server and browser? Solution l Pass messages between server and browser in JSON format. . . Rich Internet Applications 4. Ajax #40

JSON Message example var req; get. Destinations is much the function get. Destinations() {

JSON Message example var req; get. Destinations is much the function get. Destinations() { as before except for the URL var url = “/Datasources/Locations"; req = new XMLHttp. Request(); req. open("GET", url, true); req. set. Request. Header("Accept", "application/json; charset=utf-8"); req. onreadystatechange = get. Destinations. Call. Back; req. send(null); } same function get. Destinations. Call. Back() {. . . the XHTML is exactly the }. . . XML message example <body on. Load="get. Destinations()"> <h 3>Dynamically Populating a List</h 3> <form name="destinationform"> <p>Select a destination : </p> <p><select id="destinationlist"></select></p> </form> </body> Rich Internet Applications same as the 4. Introduction to Ajax #41

JSON Message example Java. Script eval function can evaluates JSON data as a Java.

JSON Message example Java. Script eval function can evaluates JSON data as a Java. Script expression – essentially as a Java. Script object literal function get. Destinations. Call. Back() { if (req. ready. State == 4) { if (req. status == 200) { var response = JSON. Parse(req. response. Text); dest. Select = document. get. Element. By. Id("destinationlist"); for (i=0; i<response. length; i++){ value = response [i]; text = value; if (dest. Select != null && dest. Select. options != null) { dest. Select. options[dest. Select. options. length] = new Option(text, value, false, true); } } dest. Select. options[0]. selected = true; } } } response is an array JSON data is: [ "Asia", "Australia", "Europe", "South America", "USA"] Rich Internet Applications 4. Ajax #42

Plain-Text Message pattern l Forces l l l Problem l l Ajax Apps require

Plain-Text Message pattern l Forces l l l Problem l l Ajax Apps require messages to be transmitted back and forth Both browser and the server must be able to access the message. That usually means the format must be easily accessed in Java. Script as well as whichever server-side language is used How can you transfer data between server and browser? Solution l Pass simple messages between server and browser in plain-text format. The emphasis here is on keeping things simple—XML or JSON are often more appropriate for complex data structures, but can also add unnecessary complexity. . Rich Internet Applications 4. Ajax #43

Plain-Text format examples l Response Code l l A simple text string l l

Plain-Text format examples l Response Code l l A simple text string l l Sometimes, all that's required is a simple response code, such as a numeric ID or a text message such as "OK" or "Failed” For example, a user's name A list l For example, a comma-separated list of search results Rich Internet Applications 4. Ajax #44

Plain-Text format examples l A custom data format l l for example, a list

Plain-Text format examples l A custom data format l l for example, a list of strings, where each string is a comma-separated list of object attributes. A Java. Script function call l l text is a call to a function which exists in the page can include parameter values created by server use eval() to execute security vulnerabilities Rich Internet Applications 4. Ajax #45

Using plain-text l Simply use response text to modify the DOM var response =

Using plain-text l Simply use response text to modify the DOM var response = req. response. Text; username. Textbox= document. get. Element. By. Id(“username"); username. Textbox. value = response; . . . <input type=“text” id=“username”> l Need to do some text parsing for more complex text formats, such as lists Rich Internet Applications 4. Ajax #46

Message format choices l Plain-Text message l l l Good for simple messages Skill-base:

Message format choices l Plain-Text message l l l Good for simple messages Skill-base: XML skills not required More complex messages require parsing, and there is ready-made support available for XML and JSON Non-standard message format Not suitable for public web services which make their data available to many web sites Rich Internet Applications 4. Ajax #47

Message format choices l HTML message l l Good for performance and browser compatibility,

Message format choices l HTML message l l Good for performance and browser compatibility, as little client-side parsing is required Not suitable for public web services as message must match a particular page format Suitable when all HTML code is generated by server templates Need to identify how much of the page content to load: form, div, paragraph, text box, etc. Rich Internet Applications 4. Ajax #48

Message format choices l XML message l l l Definitive standard for message passing

Message format choices l XML message l l l Definitive standard for message passing Wide client and server support for creating and parsing messages Suitable for public web services Choice of ways to transform XML to web page content Manual Java. Script conversion (as in the example) or client-side XSLT (Extensible Stylesheet Transformations) Rich Internet Applications 4. Ajax #49

Message format choices l JSON message l l l Increasingly widely used standard for

Message format choices l JSON message l l l Increasingly widely used standard for message passing Suitable for public web services Cleaner and lighter than XML Fairly good client and server support for creating and using messages Passes Java. Script objects, no need to parse manually, no XML skills needed Rich Internet Applications 4. Ajax #50

Using j. Query l l l j. Query is based on global j. Query

Using j. Query l l l j. Query is based on global j. Query object and the j. Query() function Shorthand syntax for j. Query is $ Queries for DOM elements, e. g. $(“#mydiv”) Returns a j. Query-wrapped set that contains results and has methods which can operate on these results, e. g. $(“#mydiv”). hide() Each method also returns a j. Query-wrapped set, so can chain methods, , e. g. $(“#mydiv”). html(“<p>Hello</p>”). show() Rich Internet Applications 4. Ajax 51

j. Query selectors l $(‘*’) l l $(‘. myclass’) l l All elements with

j. Query selectors l $(‘*’) l l $(‘. myclass’) l l All elements with class=“myclass” $(‘td’) l l all elements in document All elements of type <td> $(‘#mydiv’) l Element with id=“mydiv” Rich Internet Applications 4. Ajax 52

j. Query selectors l $(‘td, th’) l l $(‘td input’) l l All <input>

j. Query selectors l $(‘td, th’) l l $(‘td input’) l l All <input> elements inside <td> elements $(‘[value=“Submit”]’) l l All <td> and <th> elements All elements with attribute value=“Submit” $(document) l Whole document Rich Internet Applications 4. Ajax 53

j. Query inline functions l l l $(document). ready(handler) Parameter for ready is a

j. Query inline functions l l l $(document). ready(handler) Parameter for ready is a handler function which is called when DOM is loaded Parameter can be name of function, or inline function definition $(document). ready(function() {. . . }); Rich Internet Applications 4. Ajax 54

j. Query event handlers l l Handlers can be attached to other DOM elements

j. Query event handlers l l Handlers can be attached to other DOM elements in a similar way In this example, the click event handler for an element is attached once the document has loaded $(document). ready(function () { $("#submit"). click(function () { // code to handle click event. . . }); Rich Internet Applications 4. Ajax 55

j. Query Ajax events l l ajax. Send event is fired when an Ajax

j. Query Ajax events l l ajax. Send event is fired when an Ajax request is about to be sent All handlers which have been registered with. ajax. Send() are invoked $("#log"). ajax. Send(function () { $(this). slide. Down("fast"). text("LOADING. . . "); }); this refers to element which handler is attached to - id=“log” l Other events include ajax. Error, ajax. Complete Rich Internet Applications 4. Ajax 56

j. Query load() function l Loads data from the server and place the returned

j. Query load() function l Loads data from the server and place the returned HTML into the matched element $('#result'). load('ajax/test '); l Can specify a callback function $('#result'). load('ajax/test', function() { alert('Load was performed. '); }); Rich Internet Applications 4. Ajax 57

j. Query ajax() function l l Performs an asynchronous HTTP request Allows a wide

j. Query ajax() function l l Performs an asynchronous HTTP request Allows a wide range of options to be configured, including url, data type, callbacks, $. ajax({ url: '/home/person', type: 'POST', data. Type: 'json', data: json, content. Type: 'application/json; charset=utf-8', success: function (data) { // callback actions } }); Rich Internet Applications 4. Ajax 58

Shorthand versions of. ajax() l l Functions which are essentially wrappers for. ajax() with

Shorthand versions of. ajax() l l Functions which are essentially wrappers for. ajax() with some configurations preconfigured. post(). get. JSON() Rich Internet Applications 4. Ajax 59

JSON Message example using j. Query $(document). ready(function () { $. ajax({ type: "GET",

JSON Message example using j. Query $(document). ready(function () { $. ajax({ type: "GET", url: "/Datasources/Locations", data. Type: "json", success: function (json) { var select = $('#destinationlist'); $. each(json, function (i, item) { select. append("<option>" + item + "</option>"); }); $('#destinationlist'). attr('selected. Index', '0'); } }); use j. Query ready event the XHTML is exactly the same as the JSON message example Rich Internet Applications 4. Ajax #60

Mocking Ajax l l Useful during development to be able to test client code

Mocking Ajax l l Useful during development to be able to test client code in isolation Without making “real” calls to server for data Useful to be able to define “mock” data in client code for testing Example – Mockjax j. Query plugin l https: //github. com/appendto/jquery-mockjax Rich Internet Applications 4. Ajax #61

Mockjax example $(document). ready(function () { $. mockjax({ // mock response for locations url:

Mockjax example $(document). ready(function () { $. mockjax({ // mock response for locations url: "/Locations", response. Time: 1000, response. Text: ["Asia", "Australia", "Europe", "South America", "USA"] }); $. ajax({ Any calls to specified URL will type: "GET", url: "/Datasources/Locations", be intercepted and mocked, data. Type: "json", will receive specified response success: function (json) { var select = $('#destinationlist'); $. each(json, function (i, item) { select. append("<option>" + item + "</option>"); }); $('#destinationlist'). attr('selected. Index', '0'); } }); Rich Internet Applications 4. Ajax #62

What’s next l l Using Ajax with remote services Dealing with Java. Script’s single-origin

What’s next l l Using Ajax with remote services Dealing with Java. Script’s single-origin policy Rich Internet Applications 4. Ajax #63