You mean aside from defining the action in the form tag? Yes, through the use of an onClick event with Javascript. It's not a php function. Do a google for "OnClick Javascript" or something like that, or post your Q in a JavaScript forum, and you should be able to find help on this.