Web Design/AJAX Challenges
< Web Design
Web Design → AJAX Challenges
|
Please help out and update the following challenges if you think they can be improved!
Challenge 1: Postcodes and Suburbs
AJAX can seem really scary when you're starting out, but the Mozilla team have worked hard to create the AJAX: Getting Started tutorial to help us understand the building blocks of AJAX.
Work your way through the tutorial through to Step 4, making sure you test it out as you go. Once you have Step 4 working, your challenge is:
- Modify the tutorial so that your html page contains three postcodes in your area.
- When a postcode is clicked on, your AJAX will request the corresponding XML file from the server corresponding to that postcode to find and display the suburb using a window Alert.
An example XML file for the suburb Bullaburra might be:
<?xml version="1.0" ?> <suburb> <name>Bullaburra</name> </suburb>
Note: this is not a practical way at all to look up postcodes, it's just an example to build upon. We'll see a much more realistic example of this problem in a later challenge.
- Modify your code so that when a postcode is clicked, the population of that suburb is displayed as well as the suburb name (you'll need to update your XML files slightly to include the population)
- Modifying your code so that the suburb information displays in your actual page (rather than in an alert box). Hint: add an input box with an ID and set it's value from your Javascript code.
- Modify your code so that, instead of text that can be clicked on, your page provides a select drop-down box where the user can select their postcode. When a postcode is selected, your AJAX should then display the corresponding suburb and population info.
- Advanced Challenge: (not for the feint hearted) Instead of separate XML files for each postcode, create a single XML file that contains information for all three postcodes and update your code to use this one file instead.
Challenge 2: Looking up suburbs
Note: this challenge requires that you are already familiar with PHP, MySQL and how to get info out of a database and into a page.
TODO Guide to Using AJAX and XMLHttpRequest from WebPasties
Resources
See also
- School:Computer science
- Topic:Programming
- Topic:Java
- Topic:Ruby
- Topic:PHP
HTML: What is HTML, Advanced HTML Tutorial, HTML Challenges, Lists and Tables, The Structure of HTML, Pen and Paper HTML activities
CSS: Learning Basic HTML and CSS, CSS challenges, Embedded CSS, Basic HTML and CSS Tutorial, Inline CSS, Develop cascading style sheets, CSS3 Animations
PHP: Simple functions in PHP, Dynamic websites, PHP challenges, Dynamic websites with PHP, Generating a receipt with PHP, Responding to HTML forms with PHP,
JavaScript: An Introduction to Programming with JavaScript, JavaScript Challenges, Getting to know JavaScript events, Getting to know the Document Object Model with JavaScript, JavaScript pen-n-paper activities, Web Programming Intro, Produce basic client side script for dynamic web pages
XML: XML challenges
Databases: Creating Database Tables
Projects: A small website project, A step-by-step web design project, Build a basic web page, Build a small website
Challenges: Web design, HTML, AJAX, CSS, JavaScript, PHP, XML, Information Architecture, Algorithms
Activities: Web design group learning activities, Pen and Paper HTML activities, A Web Design Quiz show, Ordering Tasks for a Web Project, Paired Bio Pages, Scoping a Small Project, Emerging Technologies Research Activities
Project management: An introduction to Project Management, Developing a Client Project
Design: Accessibility, Design Principles for Web Design, Design Suggestions
Testing: Testing Website performance, Website Performance Test Plan
Publishing: Getting Your Site On the Web
Certification and standards: Cert IV Website Qualifications in Australia, Australian Qualifications, Web design qualifications
Professional development: Contribute to personal skill development and learning, Useful Applications, Useful Books, Emerging Technologies, Using the Internet as a Learning Tool
Course meta-information: Web Design, About the web design learning project, New Structure, Sample Timetable