Well, in javascript you can do something like:
document.form_name.action = "programOne.php";
document.form_name.submit();
You can set the form action to be where you want the submit button to take it, and then change the action when they exit your field.