You can keep the breading from falling off, by not over breading the onion rings, don't try to cake on the breading. Also, let them rest for a few minutes on a wire rack before frying. This will give the batter some time to set up.