Mashup and RUI Using Ajax
Mashup and RUI Using Ajax
User
Mashup website
User
Website 1 Website 2
Demonstration
46/22
jQuery AJAX Methods
jQuery Ajax
Description
Methods
get() Sends http GET request to load the data from the server.
Sends http GET request to load the JavaScript file from the
getScript()
server and then executes it.
Sends http request to load the html or text content from the
load()
server and add them to DOM element(s).
47/22
jQuery Ajax Events
jQuery Ajax
Description
Events
Register a handler function to be called when Ajax
ajaxComplete()
requests complete.
Register a handler function to be called when Ajax
ajaxError()
requests complete with an error.
Register a handler function to be called before Ajax
ajaxSend()
request is sent.
Register a handler function to be called when the
ajaxStart()
first Ajax request begins.
Register a handler function to be called when all the
ajaxStop()
Ajax requests have completed.
48/22
Advantages of jQuery Ajax
1. Cross-browser support
2. Simple methods to use
3. Ability to send GET and POST requests
4. Ability to Load JSON, XML, HTML or Scripts
49/22