you can go and get glue that is specially made to glue on those mirrors. i know we have it at our dealership and it's relatively cheap. just scrape off all the old glue from the mirror and window and re-glue it on there.
Is the button still attached to the windshield? If so, all you have to do is slide the mirror back on and tighten down the setscrew. If the button fell off just pick up some rearview mirror adhesive at autozone, reattach it to the windshield, and then put the mirror back on it.
well it turns out that it was the mirror and the screw that was causing the problems, i should have known from all the violent shaking that the mirror would do.. i solved 2 problems with 2 turns of a screw driver