Web Programming

Enriched Web Pages

The objective of this exercise is to enrich the functionality of different web pages by JavaScript.

Tasks

  1. The articles in news.html are to be displayed as an accordion, i.e. the content of each article is hidden at startup and is opened or closed again by clicking on the article's title.
  2. The form in registration.html should only be submittable if the two passwords match.
  3. Convert the list of images in gallery.html into an image gallery such that when an image is clicked, the next image is automatically displayed.
  4. By clicking the button in quotes.html a quote is to be retrieved from the quote service by an AJAX request. Appropriate messages should be displayed while the quote is loading and if an error occurs.

Solution