IP492F13A HTML5 3:Assignment Three

HTML5 logo

PeerWise

  • PeerWise
  • Course Identifier IP492 Assignment 3

Create a new question and answer all unanswered questions by next Monday. Please rate the questions as you do them.

Writing JavaScript

Use jsbin or similar online tool to create two three pages that demonstrate the following principles. Keep track of the addresses of your pages so that we can review them in the lab.

We may have started work on these during the lab, so you can use the lab work as a starting point and complete anything that you haven’t got working yet.

Regular Expressions
  • Write or find a Regular Expression for a pattern that you will need to test in a web page. If you don’t have an application for a Regular Expression try something like:
    • postal code (Canadian or US) test for both in the same Regular Expression
    • telephone number (international or local telephone number) test for both, and must include area code
    • firstname (must be longer than a single letter), lastname (must be longer than single letter)
    • exclude specific string of characters. For example – you want to filter out references to http://ebay.com or http://ebay.ca or ebay in any other form but you don’t want to filter out “there’s a boat down by the bay

 

JavaScript Callbacks
  • Write a function with a callback within a short program that demonstrates that the function and the callback are working.
    • Two versions of the function are required.
      1. the callback is named function
      2. the callback is an anonymous function
try … catch … finally
  • Write a function with a try … catch … finally block within a short program that demonstrates catching an error and handling it.

Keep track of the addresses of your pages so that we can review them in the lab. Consider emailing them to yourself at an address where you can access them in the lab.

AJAX / JSON

  • Create a working example of a page that uses AJAX to pull text from another page (AJAX source) in response to a user event.
  • Create a working example of a page that uses AJAX to pull a JSON object from another page in response to a user event.
Advertisements

One thought on “IP492F13A HTML5 3:Assignment Three

  1. yuki says:

    Most valuable tonight is building a json and making an ajax call.
    I am going to try to make an ajax call to get data and display the data. Would like to store some kind of state in the localStorage based on this data returned.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s