specifies a line break.
Note this is an empty tag so doesn't need to be closed
Back
What is the <textarea> tag
Front
defines a mutli-line input field e.g. a comment field
Back
What is the <nav> element
Front
used to encapsulate large navigation blocks
Back
What are the rules for XHTML attributes
Front
Back
What is the <pre> tag
Front
used for printing text however unlike a <p> tag it retains formatting i.e. new lines and spaces
Back
What is the <h1> tag
Front
element that defines a heading, goes from h1 to h6 in size
Back
How does inheriting styles work
Front
All HTML elements inherit the properties of elements above them in the hierarchy e.g. <h1> elements will all inherit the <body> styling
Back
What are the padding properties for CSS
Front
It has the exact same properties as margin except with padding instead of margin
padding also cannot have a length set to auto
Back
How do you make multiple selections in CSS
Front
separate each selection with a comma
Back
what is the <p> tag
Front
defines a paragraph, all text within the element is printed on 1 line
Back
What is the <datalist> element
Front
specifies a list of pre-defined options for an <input> element
different to select because the user types in an option but can also choose directly from the drop down. If they start typing they will get suggestions dropping down
Back
What are the margin properties for CSS
Front
margin-top/right/bottom/left
the value can be set to auto, inherit, a specific length e.g. 10px or a % which is a % of the width of the containing element
Back
How do you define a table in HTML
Front
the <table> tag defines the whole element
<tr> defines table rows
within each row define <td> elements which are the table data
Back
What are inline elements, give an example
Front
- Can begin within a line
- doesn't start a new line
It's width only extends as far as it is defined by its tag
- e.g. <span>
Back
How do you link a stylesheet to an HTML document
Front
Back
How do you use class selectors
Front
.classname, you can put the element type before the classname e.g. p.class which will style all of that element type with that class
Back
What is the <output> element
Front
represents the results of a calculation
Back
How do you specify colours in CSS
Front
- colour names
- RGB values using the formula rbg(red, green, blue), values go from 0 to 255
- HEX values using #RRGGBB where values are between 00 and FF
Back
What is the <head> element
Front
Holds the header elements of a section or page
Back
What are block level elements, give an example
Front
- Begin a new line
- Extend to the full width of its parent element
- e.g. <div>
Back
How do you specify style directly from HTML
Front
you can use a <style> tag and write CSS inside the element
Alternatively you can set it using attributes within the given HTML element e.g. style = "property:value;"
Back
What are the rules for XHTML elements
Front
Back
What is the <head> tag
Front
contains meta information information about the document
Back
What are the mandatory elements within XHTML
Front
<!DOCTYPE>
<html>
<head>
<title>
<body>
Back
What is the <section element
Front
a generic section of a document, groups content by themes like sections in a document
Back
Explain CSS syntax
Front
Back
What is the <aside> element
Front
similar to a sidebar, could be used to hold adds
Back
What is a <div> tag
Front
Used as a container that groups related items together
Back
what is special about the <img> tag
Front
it is an empty tag so doesn't need to be closed
Back
How do you create unordered and ordered lists in HTML
Front
<ul> defines an unordered list
<ol> defines an ordered list
Each element within the list has the <li> tag
Back
List the main input types
Front
text, password, reset, radio, checkbox, color, email, date
Back
What is XHTML
Front
It is a stricter version of HTML, it is HTML redesigned as XML, a markup language used to store, send and receive data
Back
What is the <footer> element
Front
contains the footer elemtents, e.g. author, copyright, contact info
Back
What is a select element in a form
Front
It is a drop-down list,
you specify options within the drop down using the <option> tag
Back
What information is held within the <meta> tag in the <head> element
Front
Back
What is the xmlns attribute in XHTML
Front
it's an attribute of the html tag
it is mandatory and specifies the xml namespace - this specifies a simple method for qualifying element and attribute names used in XML and associated them with namespaces identified by URL references
Back
What is the <canvas> element
Front
it is used to draw graphics via javascript
Back
what is the <body> tag
Front
defines the document body, the visible content
Back
What is the <html> tag
Front
the tag that defines the whole document
Back
What is the <article> element
Front
a self-contained item of content, such as a blog post
Back
What are the CSS properties for borders
Front
border-style specifies what kind of border to display
border-width specifies the width of the four borders
border-color sets the colour of the four borders
border radius can be used to add rounded borders to an element
border-image
Back
What are the CSS properties that define the background
provide additional information about an element
specified in the start tag in name/value pairs like name="value"
Back
What is the <time> element
Front
represents dates and time within javascript
Back
How do you use the CSS border-radius property
Front
Back
How do you use an element selector in CSS
Front
element-name {styling}
Back
How do you use HTML forms
Front
The whole form is within the <form> element
<input> elements sit within the form element
the form should have a <input type="submit"> element which is a button which submits the form when the user completes it
Back
Section 2
(50 cards)
Explain how you would use a CSS counter
Front
Back
What are the properties for counters
Front
Back
How do you specify the font in CSS
Front
using the font-family property
when specifying the value you start with the font you want and then end with a generic family.
Back
How do you define an array in PHP
Front
Back
What is the resize property
Front
defines whether or not an element should be resizable by the user
Back
How do you make images adjust to fit the size of the screen
Front
Back
How do you iterate through an array in PHP
Front
Back
What are the CSS properties for formatting text
Front
Back
What is the clear property and what value does it take
Front
Used to control the behaviour of floating elements
Back
What is the syntax of pseudoclasses in CSS
Front
Back
What is the word-break property
Front
Back
What is a CSS pseudoclass
Front
used to define a special state of an element i.e. when a user mouses over something
Back
What is the filter property in CSS
Front
adds visual effects such as blur or saturation to an element
Back
How do you left/right align and object
Front
using the float property or using position absolute
Back
What values can the CSS position property take
Front
Back
What are the values of the text-overflow property
Front
Back
How do you centre text inside an element
Front
text-align:centre
Back
What are the CSS list properties
Front
list-style-type specifies the list item markers
list-style-image sets an image as the list item marker
Back
What must PHP statements lie between
Front
<?php and ?> elements
Back
How do you use transform methods in CSS
Front
transform: method()
Back
What is the object-fit property in CSS and what values can it take
Front
Specifies how an image or video should be resized to fit its container
Back
How do you do 3-D transformations
Front
using the rotateX and rotateY properties that rotate the element around the specified axis
Back
What is the <a> HTML element
Front
it specifies a link
Back
What a CSS transition and how do you use them
Front
Allows you to change property values smoothly from 1 value to another.
This doesn't carry out the change, you would specify the change using pseudoclasses but this specifies how any changes will happen to said class/element
Syntax: transition: property time(s);
Back
What values does the ob
pacity property take in CSS
Front
0.0-1.0
Back
How do you create a zebra striped table in CSS
Front
Back
How does PHP run on the web
Front
1. User accesses a website (e.g. www.linkedin.com) 2. Browser sends a message over the internet to the computer named www.linkedin.com
3. Apache, a program running on www.linkedin.com, gets the message and asks the PHP interpreter "what does /index.php look like?"
4. The PHP interpreter reads the file from it's disk drive/file system
5. The PHP interpreter runs the commands in the index.php file possibly exchanging data with a database program such as MySQL
6. The PHP interpreter takes the index.php program outputs and sends it back to Apache as the answer Apache sends the page contents it got from the PHP interpreter back to the computer over the internet. The users browser then displays the page on the screen following the HTML tags in the page.
Back
What are the benefits of PHP
Front
- runs on various platforms
- is compatible with almost all servers used today
- Supports a wide range of databases
- Free
- Easy to learn and runs efficiently
Back
What is the border collapse property in CSS
Front
used in tables to combine all overlapping borders
Back
How do you add icons to your webpage
Front
link an online icon style sheet such as google icons, then add classes to HTML elements and this will style them with the icons
Back
How do you define the time it takes for transformations to take place
Front
use the transition property
Back
What are the values of the overflow property
Front
Back
What are the CSS properties for animations
Front
animation-name
animation-duration
animation-iteration-count (how many times to run the animation)
animation-delay (which specifies the delay at the start of the animation)
Back
What are the outline properties in CSS
Front
outline-style
outline-color
outline-width
outline-offset, adds space between an outline and the margin of an element
Back
How do you specify a transition property for multiple properties
Front
Back
What is an outline in CSS
Front
It is a line drawn around the element outside the margin. It doesn't effect the elements dimensions
Back
What are the values for the transition timing function
Front
Back
What is the float property and what values can it take
Front
It can be used to wrap text around images
Back
How do you centre images and block elements
Front
margin:auto
Back
What CSS properties can be used to format links
Front
Back
What is the padding property for tables in CSS
Front
specifies the space between the cell content and its borders
Back
what is the box-shadow property
Front
applies shadow to elements
Back
What are the CSS properties for styling fonts
Front
font-style e.g. normal, italic
font-size, 1em is equal to the current fontsize, you can specify absolute sizes in px
font-weight specifies how thick/thin characters should be
font-variant specifies whether or not text should be displayed all in caps or not
Back
Explain the CSS display property
Front
It can take the values:
none
block
inline
inline-block (this makes the elements like inline elements but they can have a width and height)
Back
Explain the CSS box model
Front
Back
What are the basic 2D translation methods in CSS
Front
translate() - moves an element, 2 params, lateral then vertical movement
rotate() - takes deg as a param e.g. 20deg
scale() - takes 2 values, first the scale to increase width by and then height by
skew() - takes deg as a param e.g. 20deg
Back
What are the CSS properties for the size of an element
Front
height, width and maximum width
the values can be set to auto, length and %
Back
What is the CSS matrix transform method
Front
Combines all 2D tranform methods in to one
matrix(scaleX(),skewY(),skewX(),scaleY(),translateX(),translateY())
Simply insert the values for each method separated by commas in that order
Back
How do you use CSS animations
Front
you define the animation within an @keyframes rule and then apply it to elements using the animation-name: animation; property
Back
What are CSS counters
Front
they are variables maintained by CSS that can be incremented
Back
Section 3
(50 cards)
How do you insert values into an SQL table
Front
Back
What are the benefits of POST over GET
Front
Much less visible because data isn't transferred in the URL
The data is not logged
Users cannot inavertently share sensitive data in a URL
Back
How do you define a database in PHP
Front
You specify the hostname, username, password and database name in that order
Back
what happens if you set a cookie to "HTTP Only"
Front
Ensures that a cookie is only available via HTTP request
Prevents the cookie from being accessed within JavaScript and reduces the potential for cross-set scripting attacks
Back
What is the stripslashes() PHP function
Front
removes backslashes
Back
What does it mean if you set a cookie as "secure"
Front
only send cookies to the server if the request is using HTTPS
Back
What is the HTML required attribute
Front
if you add the attribute to an input element it will be mandatory before submitting a form
Back
What do we need statefulness for on a website
Front
- session management e.g. shopping carts
- User identification e.g. login
- Analytics e.g. footprints
Back
How do you define the submit button and what do the attributes do
Front
you set the input type as submit
the value will define what is shown on the button
the name will define how you access the button from the action script
Back
what is the "path" that is stored in a cookie
Front
specific paths on the server to which the cookie can be sent
Back
What is the trim() PHP function
Front
removes whitespace and other predefined characters from both sides of a string
Back
What is the action in an HTML form
Front
it is the location of the script that will process the form.
Back
What makes up a MySQL table
Front
Fields: columns, each describing an aspect of the data
Records: each row is a record and has a single entry for each field
Data types: as in a programming language each piece of data has a specific type
Back
What is the syntax for the setcookie command in PHP
Front
only the first param is required, others are optional
What should you know about the expiration date that is stored in a cookie
Front
The expiring time is the number of seconds since 01/01/1970 00:00
If not specified the cookie expires when the browser is closed
Back
How do you setup checkboxes in an HTML form
Front
each input is given a name but no value, this is because either the input is set or it isn't
So you check it in the script using isset(), the value is irrelevant
Back
How do you delete data from a MySQL table
Front
Back
How do you handle database errors in PHP
Front
using
mysqli_connect_errno
Back
How do you query a database using PHP
Front
where $db is the database variable you've already created
define the query as a string taking the exact same format as MySQL queries
Then submit the query using $db->query($query)
Back
What is meant by the fact that HTTP is a stateless protocol
Front
Once the server has supplied the client with a web page, all connection between them is forgotten
Back
How do you retrieve data from a MySQL table using PHP
Front
Back
What is the size of a cookie
Front
4kb
Back
What are the attributes of GET messages
Front
- Are cached
- Are kept in the browser history
- Can be bookmarked
- Limited by any restriction on URL size
Back
How are POST messages sent
Front
using the HTTP headers
Back
How do you setup a form to show required values and errors if an incorrect value is entered
Front
In the picture is an example. The $error variable is set by a PHP if an incorrect value is send to it
Back
What is the method for HTML forms
Front
either POST or GET, these are methods of sending the data to the script defined by the action attribute
Back
How can you prevent cookies
Front
A client can inform a server that it does not want tracking by setting the Do Not Tracker header in the HTTP request, this is visible to the server as HTTP_DNT
Back
How do delete a cookie
Front
you set its expiring time to a negative value so it "expires"
Back
What is the NOW() function in mySQL
Front
it inserts the current and or time
YYYY-MM-DD HH-MM-SS
Back
How do you setup a set of radio buttons
Front
You give each button the same name="" value and a different value=""
This way whatever option they pick will have the same name in the PHP script but different values
Back
What is the htmlspecialchars() function in PHP
Front
This avoids the browser displaying HTML tags and other HTML entities that will alter the output of the webpage,
this prevents a user entering HTML into a form and then altering what is displayed
Back
How do you use a JS script to validate a form
Front
in the form add an attribute onsubmite="return validateForm()" this would reference a JS script/function you've written called validateForm()
Back
What are the characteristics of POST messages
Front
- Cannot be cached
- Are not kept in the browser history
- Cannot be bookmarked
- Can transfer unlimited data
Back
How do you start a PHP session
Front
session_start()
Back
What properties should a cookies value have
Front
should be a unique and unforgettable number, it should be meaningful to the server and meaningless to the client
Back
What is contained within a cookie
Front
name, value, expiration date/time, domain, path
Back
What is the syntax for querying MySQL tables
Front
conditions are written as:
WHERE column LIKE value
Back
What is the syntax for the LIKE operator
Front
a % sign represents any number of characters (inc 0)
an _ represents a single character
You place these before or after the value you're querying to make your search broader
e.g. Where CustomerName Like "a%" represents any name beginning with a
Back
What is the syntax for the Update method in MySQL
Front
Back
What are the advantages of GET over POST
Front
Useful to bookmark pages
Caching- faster response
Back
How do you specify the order a MySQL table is displayed in
Front
at the end of your query add ORDER BY field DESC/ASC;
Back
How do you access cookies
Front
Much like GET and POST you access cookies using the $_COOKIE array indexed by the cookie names
Back
What is a cookie, who can read a cookie
Front
It is a piece of data that the server asks the client to store, and the client returns to the server with its requests
Cookies can only be read by the issuing domain
Back
How do you access variables send via POST and GET in PHP scripts
Front
the values are stored in $_POST and $_GET arrays which you can use the access the values as shown in the example.
It is good practise to use if(isset()) before using a POST/GET value to avoid errors (as is done in the example)
Back
What is the syntax for defining a textarea in a form
Front
Back
What is the "domain" stored in a cookie
Front
the host that sent the cookie, only the original host will receive the cookie back from the client
Back
What is a PHP session
Front
stores variables across multiple pages. unlike a cookie the information is not stored on the users computer.
They hold information about one single user and are available to all pages in one application
Back
How do you define a function in PHP
What ways can you pass in values in PHP
Front
function functionname(params){code}
You can pass values into functions and make any changes to them global by adding an & sign before the variable. Otherwise any changes will be local
Back
Section 4
(50 cards)
What is phishing in terms of XSS
Front
the attacker manipulates the DOM to add a form that appears to be a part of the website - the user submits it and sends the information to the attacker's server
Back
What is the structure of an HTTP response
Front
Back
What are the 3 ways a server can interpret an HTTP request
Front
- server maps the request into a file on the server and returns the file request to the client
- Server maps the request into a program on the server, executes it and returns the output to the client
- An error is returned if the request cannot be satisifed
Back
What are the most common codes for an HTTP response
Front
200 - OK
301 - Moved Permanently
404 - Not found
500 - Internal Server error.
200s are mainly +ve
400s are a client error
500s are always a server error
Back
How do you prevent XSS
Front
use htmlentities/htmlspecialchars to sanitise any user input so that the code is no longer interpretable as HTML and will have no effect
Back
What are the pros and cons of sessions
Front
Pros:
- Data is held on the server so is more secure
- No 4kb restrictoin
- No transmission latency
Cons:
- Still reliant on cookies which can be disabled
- Don't persist between browser sessions
Back
How do you use real_escape string to prevent SQL injections
Front
Back
What object do all JS functions below to as default
Front
the window object, so window.myfunction always works if you have defined the function as part of another object
Back
What are the attributes of the model, give a practical example
Front
- Stores data
- Does not have any responsibility for presentation matters
- Does not do any computation
- Model objects often used to store data within a program
The model could be implemented as HTML
Back
How do you write to an HTML element using JS
Front
using element.innerHTML
Back
How does HTTP work on a basic level
Front
An HTTP client sends a request message to an HTTP server
The server, returns a response message
The Uniform Resource locator (URL) is used to uniquely identify a resource over the web
Back
How do you insert JS code into HTML
Front
between <script> and </script> tags
Back
How do you define a variable in JS
Front
using var
e.g. var x - 4;
Back
How do you write into an alert box using JS
Front
window.alert()
Back
How do web servers and browser ensure safe transfer of passwords
Front
HTTPS communications using an encrypted channel (either transport layer security (TLS) or secure sockets layer (SSL)
Server sends its digital certificate to the browser
Once the certificate is received the secure communication channel can be established, handshaking
Back
What are the attributes of the controller, give a practical example
Front
- Sits between the model and the view, acts as an intermediary
- Updates models and views when they change
The controller is generally the browser
Back
What is the structure of an HTTP Request
Front
Back
What are the 3 types of XSS
Front
Reflect XSS: User is tricked nto requesting an injected URL
DOM XSS: when javascript is executed the DOM is changed by malicious script
Persistent XSS: a page displays data stored in a database that contains malicious code
Back
What data forms is HTTP the protocl for
Front
- Plaintext
- Hypertext
- Images
- Video
- Sound
Back
How do you write into the browser console using JS
Front
console.log()
Back
How can you access properties in JS
Front
Back
What are the two ways to prevent an SQL injection
Front
Using real_escape_string()
Using prepared statements
Back
When should you use sessions and when should you use cookies
Front
Cookies should be used to preserve state over a series of unconnected sporadic visits
Sessions should be used when the state is to be preserved over a connected sequence of visits.
Back
How do you delete a property in JS
Front
use delete object.property
Back
How can we break a website down from a design perspective and why do we do this
Front
It can be organised into:
The model: handles the data and business logic
The view: handle user interface application
The controller: handle user interface objects and presentation
This supports decoupling which reduces dependencies between different components of the system
Back
What is an HTML injection/cross site scripting (XSS)
Front
involves pasting HTML code from a client to a server and back to another client
Back
How do you write into HTML output using JS
Front
document.write()
Back
What are the ways you can close a session or clear all variables
Front
session_unset() removes all the current variables
session_destroy() removes all variables and destroys the session until one is started again
Back
How do you iterate through an objects properties
Front
for(property in object)
Back
How do you access session variables
Front
using the $_SESSION array
Back
What are the attributes of the view, give a practical example
Front
- Present the data stored in the model and display in the browser
- various approaches and multiple views for the same data e.g. lists, tables, visualzations
The view could be implemented as CSS
Back
What is an SQL injection
Front
passing SQL from a web client to a server and onto a database
Back
What are the HTTP request methods
Front
Back
How do you new keyword to define an object in JS
Front
Back
Why should you use a salt
Front
prevents recovery of the password by looking up the hashed password in a rainbow lookup table
It prevents 2 users with the same password having the same hashed password
Back
What is the header() command in PHP
Front
it redirects a user to a different page
Syntax: header("Location: domain.com/path/to/resource")
Back
How do you add new properties to an object in JS
Front
simply use object.property = "value" and a property with the given name and value will be added to the object
Back
What is a hashing function
Front
it takes a password (string), M and returns a number, H(M). It is a one way function. Even if the input changes a tiny bit, the resulting hash is completely different
Back
What is special about how JS handles function parameters
Front
it doesn't type check them
it doesn't check the number of arguments received
missing params are just set as undefined
How do you use sessions to allow users to log-in to a site
Front
get the user to enter a username and password. Then check these using a PHP script, If they are correct start a session and assign a session variable for their username.
You can then check if the username variable is set to see if a user is logged in. You can also use the session variable to customise the webpage and show their username where appropriate
Back
What are the wrong ways to use a salt
Front
reusing a salt for all users
using a very short salt
Back
What is salting
Front
Adding a random string to the password string
Back
How do you define a function in JS
Front
function myFunction(a, b) {code}
note that the data type of parameters isn't specified
You can assign function to variables as well, so I could say
var x = function (a, b) {code}
and x(a, b) would run the relevant function
Back
what is the PHP function that can be used to check the contents of a string
Front
preg_match(check-to-carryout, string)
Back
How do sessions work, how are they stored
Front
The session uses the clients cookie storage to save a key which is used to identify one particular repository of variables
When a session is opened on another page it scans the computer for a user-key
If there is a match, it accesses that session, if not it starts a new session
Back
How do you use salts when creating a password system
Front
Add the random string to the password string, hash the combination of the two, then store the hashed password along with the salt in the database
When the user tries to login, retrieve their salt and add it to the password they gave, hash this and see if it matches the hash in the database
Back
what is the PHP strlen() function
Front
it returns the length of a string
Back
How do you define an object using an object literal
Front
A list of name:value pairs inside curly braces
Back
Section 5
(44 cards)
What is a JS object method
Front
it is a property containing a function definition
Back
What is a pseudo-element and how do you use them
Front
They are used to style specified parts of an element, e.g. the first letter/line
Back
What are two issues with AJAX
Front
If JS is disabled then AJAX calls won't work, so you need to have a fallback to manually reload the page in these situations.
The use cannot tell that page content is loading when an AJAX call is underway, unlike when they refresh the page. This can be accomplished by using CSS to add a loading icon whilst the AJAX call is still in progress
Back
How do you read data from a csv file in D3
Front
Back
What is the status property of the XMLHttpRequest object
Front
holds the current HTTP response code of the AJAX request
Back
What is D3
Front
It is a JS library for manipulating documents based on data
Back
What are semantic elements in HTML5
Front
These are elements which are named so that they can describe their content. This makes it easier for a screen reader to easily parse the page and identify which elements should be read out to a partially sighted user
e.g. ignoring nav elements and reading out article elements. This is far harder for non-semantic elements such as divs which doesn't describe the content that contains them
Back
What basic elements make up a D3 statement
Front
D3 - the main D3 object containing it's methods
Select - selects a single element based on CSS selector
Append - adds a DOM element to the end of the current selection
Content - sets out how the element is going to be displayed/what it will contain
Back
What is the benefit of javascript validation
Front
It prevents unnecessary internet traffic caused by transmitting invalid data and returning error messages
Back
Explain the importance of form validation
Front
Important to ensure invalid data does not reach the database
A form can validate the format of the data but not the correctness of the data
Validation can take place on both the client and server end
Back
How do you remove an event handler
Front
Back
Discuss the relevance of D3
Front
With big data there is more data than can be presented reasonably using tables
D3 provides a range of techniques for visualising data.
It facilitates interaction, meaning users can tailor a visualisation for their own needs.
It is well suited to use in a browser given its reliance on SVG
Back
What are the server response methods of the XMLHttpRequest object
Front
Back
How do you create an id field in an SQL table
Front
id INTEGER PRIMARY KEY auto-increment,
Back
What is event propagation and how do you use it
Front
This defines the element order when an event occurs. e.g. a p element inside a div, whose event is triggered first if both are activated at the same time.
In bubbling the inner most elements event is handled first. In capturing this is reversed
the third param of the addEventListener is useCapture, if set to true capturing will be used, if false bubbling
Back
What is the transition() function in D3. how do you use it
Front
it interpolates positions between the starting an ending positions of the bar.
duration(x) sets how long the transition will take
Back
Give an example of creating a bar chart using D3
Front
where sun is an array of values
Back
What is the syntax of addEventListener
Front
Back
Why do we use font-family declarations, give an example of a font family
Front
Because they provide a generic behaviour if the browser doesn't have the specified font, an example is sans-serif or serif
Back
What are Scalable Vector graphics,
How do you use them
Front
XML-based approach to defining graphics
All SVG's sit within an svg HTML element, elements within this define the shape, attributes define the style and size
Back
What are the benefits of AJAX
Front
- Read data from a web server after the page has been loaded
- Update a web page without reloading the page
- Send data to a web server in the background
Back
What are the methods of the XMLHttpRequest object
Front
Back
How do you update data using D3
Front
You change the .data value of a d3 object and it will automatically recalculate the object using that dataset
Back
How can you assign events to HTML elements
Front
Back
HTTP vs. HTTPS
Front
Data transmitted using HTTP may be visible to a man in the middle as it is not encrypted. Whereas HTTPS is encrypted so even if the data is intercepted it won't be decipherable.
Back
what is the readyState property of the XMLHttpRequest object
Front
holds the current status of an AJAX request
Back
What is the HTML DOM
Front
Document object model, created when a browser loads a web page. The model is constructed as a tree of objects
Back
How do you access the length of an array in java
Front
array.length returns the length
Back
What are the main ways you can select HTML objects using JS
Front
Back
How do you create a constructor in JS
Front
Back
What is the flow of control of an AJAX request
Front
Back
What is the enter() command in D3
Front
identifies any DOM elements that need to be added. For example if you use it after a .data(dataset) statement it will create the correct number of objects for each element in the dataset
Back
How do you add elements to JS arrays
Front
Back
How do you define arrays in Java
Front
Back
What are all of the on_____ events that you can use
Front
onload and unload are triggered when the user enters or leaves the page
Onchange is often used in combination with validation of input fields
Onmouseover and onmouseout
onmousedown, onmouseup, onclick
Back
what is the onreadstatechange property of the XMLHttpRequest object and how do we use it
Front
this can be defined as a function of our object which will run once the request is completed
Back
WHat is an XMLHttpRequest Object and how do you define one
Front
It is an API whose methods transfer data between a web browser and a web server asynchronously
Var x = new XMLHttpRequest();
Back
What does AJAX stand for
Front
Asynchronous Javascript and XML
Back
What is NaN
Front
not a number, indicates that a number is not a legal number
Back
What is the exist() command in D3
Front
removes items from the DOM that are no longer needed i.e. do not have a data item allocated to them
Back
If you have conflicting CSS declarations how do you decide which rule is followed
Front
The rule with the greatest specificity,
the greatest is id, then class then pseudo-elements
Back
What should be considered when choosing elements for an HTML form
Front
avoid simple text fields when possible
use elements that reflect the type of data that they will be used to collect
this minimises the user error and can be used to validate the data
Back
What are the properties used for retrieve the data from an AJAX request
Front
Back
What are replaced and non-replaced elements in HTML
Front
A non-replaced element contains its data within the HTML e.g. paragraph or div
a replaced elements fetch their content as the page is loaded e.g. images