Make button do 2 things at once

Is there a way for a button to do 2 things at once? example. submit and go to a url. or submit and show a pop-up?