function submitDummyForm(theAction, theVariableName, theVariableValue) { var tmp = confirm('Really?'); if (tmp) { var form = document.getElementById('dummy_form'); form.action = theAction; form.some_var.name = theVariableName; form.some_var.value = theVariableValue; form.do_submit.value = '1'; form.submit(); } return false; }