Hi,
Take a look into modules/Tests/QuickForm/QuickForm_0.php lines 42-51. It uses external file (update_sel.php) to update select boxes.
Quick tutorial:
1) create form elements with ids (you can use QuickForm for it, as it is in the example)
2) on second, third, etc element use method Utils_ChainedSelectCommon::create to "chain" it with previous elements
Utils_ChainedSelectCommon::create('current element id',array('previous element id'),'update file that returns json formated array.php', '<parameters passed to external file>', 'default value (should be $f->exportValue("current element id"))');
3) create update file, in $_POST['values'] you've got previous elements values. $_POST['parameters'] is parameter passsed with Utils_ChainedSelectCommon::create
Easier method is to use commondata quickform element, lines 34-38 in the same example, but it will work only with static "commondata" data. Fourth argument is array('Common data path', 'previous commondata element name',....). In line 34, there is no previous element, so there is only "common data path".
Thats it.
Paul