Code isn't just magic text, it's a sequence of instructions. Why don't you think about how exactly you want your button to work, break it into a series of steps, and try to write code for each step? If you get stuck at a particular part, post what code you tried (even if you know it's completely wrong) and ask for help then.