Operators
most logical operators automatically convert types:
What is the Prototype JavaScript Framework?
The Prototype JavaScript library adds many useful features:
What is client-side scripting?
What are client-side scripts?
server-side programming (PHP) benefits
client-side scripting (JavaScript) benefits:
How is JavaScript linked in HTML?
script src=”filename” type=”text/javascript”>
What is JavaScript + uses?
a lightweight intepreted object-oriented programming language (“scripting language”)
Problems of JavaScript
JavaScript vs. PHP
(similarities & differences)
Similarities:
Differences:
process of event-driven programming
give an example of an event handler
onclick is an example of an event handler, a ‘responsive’ JavaScript function
synchronous vs asynchronous web communication
Synchronous web communication (click, wait, refresh)
Asynchronous web communication (user can keep interacting with page while data loads) – made possible by AJAX
Describe a Web Application
Web applications are dynamic websites that mimics the feel of a desktop app and presents a continuous user experience rather than disjoint pages by downloading data from a server in the background (e.g., Google Docs).
What is AJAX
Ajax is useful for web applications.
What are undefined and null values
undefined: has not be declared, does not exist
null: exists, but was specifically assigned an empty (null) value
describe the following parts of JS:
s1.charAt(1)
charAt(1) is a function because of the ()
s1 is an object because it has a . after it
give 3 examples of how javascript would change html
1. change html content when an event occurs
button type=”button” onclick=’document.getElementById(“demo”).innerHTML = “Hello JavaScript!”’>Click Me!
2. change html attribute when an event occurs (e.g. update shopping card item number)
3. show hidden hmtl content when an event occurs (previoulsy hiddent content appears)