When he was younger, my son loved peeing straight up into the air when I had him undressed on the changing table. Fun for him, not for me. So, I stuffed a paper Dixie cup with tissue and set next to the changing table. The next time he pulled his "Old Faithful" routine, I simply inverted the cup over the stream to catch it. From there, I could toss it directly into the trash. Works like a charm!
Related: What to do with your kid when you’re in a public restroom?
(Not exactly related, but includes mention of the "flying pee maneuver" which is worth a link all by itself.)