Due at 5:00pm, Monday, March 17th, 2008, by email submission only.
This assignment explores the following topics related to web programming:
You must use Mozilla Firefox for this assignment. We don't require your code to work in other web browsers, but it must work in Firefox.
Skeleton code for this assignment can be found here:
We also provide some resources to help you with web programming:
Start by filling in WordFinder-slow.html so that it displays a static (unchanging, basically unfunctional) rendition of the WordFinder interface shown at the right. You should only add declarative code (HTML and CSS) at this point; you shouldn't introduce any Javascript yet. Your static interface should show a dozen or so words in the listbox, but the list shouldn't change when you type into the textbox.
Follow the specification of PS1 for your interface, with the following exceptions:
Useful HTML elements include TABLE (to lay out the elements), INPUT (for textboxes), BUTTON (for buttons), and SELECT (for listboxes).
You should make an effort to separate the structure of your interface (specified as HTML) from details of presentation (specified as CSS), so that they are independent.
Now add Javascript code to WordFinder-slow.html in order to implement the behavior of your interface, e.g. so that typing in the Find box filters the listbox. It should behave as specified in PS1, with the following exception:
Your Javascript code will have to add and remove OPTION elements from the listbox, in order to repopulate the list. Alternatively, you can show and hide OPTION elements by changing their CSS style properties.
The problem with using a SELECT element as a listbox is that it doesn't scale to thousands of items. To solve this problem, we provide a Javascript class (FakeScroll.js) that turns a DIV element you create into a scalable listbox.
Fill out the WordFinder-fast.html skeleton so that it uses FakeScroll to display and filter the entire dictionary. Much of WordFinder-fast can simply be copied and pasted from your WordFinder-slow; you should only need to change the parts concerning the listbox.
Read FakeScroll.js carefully, because you don't use it the same way as you used the SELECT element in the previous problem.
Answer the following questions in readme.txt.
Package your completed assignment as a zip file, containing a single folder with your files inside it. (If you use Eclipse, then you can package your project as a zip file by selecting the project and invoking Export / General / Archive.) Here's a checklist of things you should confirm before you hand in:
Submit your solution by email to 6831handin@csail.mit.edu and include PS4 in the subject line.