My male maltese did the same thing until I got him neutered and then he didn't do it anymore! I was astonished! My dogs don't know how to tell me that they need to go out either, so I have started training them to ring a bell. Check out
www.poochie-bells.com... that's what we're using. Good luck!!