[eluser]Ben Edmunds[/eluser]
There are several ways of doing this.
The way I would choose is to do an ajax request [.request()] with the chosen main category to a controller that interacts with a model and return the sub-category items.
If you are using JQuery then the function is ajax(). If you are using something other than JQuery just research AJAX request with whatever your using, whether that be straight javascript or another framework.