Web Programming - Week 8 Flashcards

1
Q

What is AJAX

A

Asynchronous Javascript and XML - A set of web development techniques

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

AJAX Bullet points

A

Enables web browser to send and recieve data in the background
Makes it possible to update the page without reloading

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to create an object for AJAX

A

var httprequest = new XMLHttpRequest();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to initialise a request

A

httprequest.open(method, url, async)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Methods of http requests

A

GET and POST

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to send a http request

A

httprequest.send();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to send a request with form data

A

httprequest.setRequestHeader(“Content type”, url)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

AJAX status responses

A

200 - OK
403 - Forbidden
404 - Page not found

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Choosing which function will manage a response of a request

A

httprequest.onreadystatechange = function;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

jQuery AJAX methods

A

load() - loads data directly in html
$.get()
$.post() - large data
$.ajax() - most configurable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

AJAX load syntax

A

$(selector).load(URL,callback);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the callback argument

A

The name of a function to be executed after a load method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

AJAX method syntax

A

$.ajax({name:value, name:value…})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly