CS 437/637 Database-Backed Web Sites and Web Services
Homework Assignment 2
Wednesday, October 15, 2014
Monday, October 20, 2014
( 10 pts) The text file book.txt consists of book details(Author Name, Book Name and Description).
You should keep the book information using arrays in JavasScript and display the author name and book name of all the 3 books at some place in the webpage (using paragraphs or tables).
Create an HTML file retrieve.html, an external CSS file retrieve.css,
(30 pts) retrieve.html has one text input field for Author Name, one drop-down list for Book Name
and a RETRIEVE button. A textarea box to display description of the book which is retrieved.
Both Author Name and Book name are required.
After a user enters an author name, selects a book name, and clicks the Retrieve button, the corresponding description given in the attached text file
should be displayed in the textarea box.
If a user forgets to enter a author name/book name and clicks the Retrieve button, an
error message “*Required” must be printed after the corresponding input field.
Book Name or Author Name is not case sensitive.
You should display an error message if the user enters an invalid Author Name which does not start and end with a letter.
The textarea box remains empty if the author name does not match with a book name. It is unnecessary to display an error message.
(50 pts) Use retrieve.js for all the functions and retrieve.css to control
the page style.
( 10 pts) retrieve.html must be Valid XHTML 1.0
To show your readers that you have taken the care to create an interoperable Web page, you
should display this icon on the web pages. Here is the HTML you could use to add this icon to your Web
alt="Valid XHTML 1.0!" height="31" width="88" /></a>
</p> Once the W3C icon is clicked, W3C MarkUp Validation Service
should valid your pages successfully.
Turn in the paper copy and soft copy
retrieve.html source code
retrieve.css source code
retrieve.js source code
the resulting web pages of various test inputs including at least one passing case (e.g., a correct name) and one failing case (e.g., no name provided)
Paper copies should be bound firmly together in one pack. 5 points
will be deducted for unbounded homework.
Turn in the paper copies of your web pages including the
CSS and HTML source
code and screen snapshots of the resulting web page. Hard copies should be bound firmly
together as one pack. 5 points will be deducted for unbounded homework.
Submit the softcopy of the files through your Blackboard account.
Zip all the files including the cover page into one ZIP file. Name the ZIP file
An invalid homework URL (You must provide URL in your cover page) results in 10
No hard copies or soft copies results in 0 points.