section idea/code by Stefanie Hatcher
Today we will write a page "Pet-It" that shows information about breeds of cats and dogs using Ajax. The HTML and CSS are already written; start from a skeleton petit.html and petit.js. Add the JavaScript event-handling and Ajax code. Click the following image to run our sample solution, written by Stefanie Hatcher: (solution JS code petit.js)
All required files are on Webster in the directory http://webster.cs.washington.edu/sections/09sp/section7/, or you can download them as section7.zip.
dogs.txt and cats.txt.
breeds/chow_chow.html and breeds/chow_chow.jpg.
selected). If the user reaches the last breed and clicks Next, wrap around to the start.
References:
Ajax.Request,
Ajax.Updater,
Ajax options, JSLint