here is cool sample code with download and demo
http://buffernow.com/cascading-dropdown-ajax/

Hope it will help:)