I wish there were some magic trick I could tell you, but the truth is, all you can do is limit your exposure to cut onion. If you wore goggles (aka the "barrier method") that would help, but most of us aren't willing to go that far.
Also, drape chopped or cut onion that is out on the counter with a paper towel. That prevents the gasses from escaping and making their way to your eyes. Of course it goes without saying that you want to be sure to wash your hands before touching anywhere near your eyes.