Try this: function clearText() { if (confirm('do you want to do this?')) { // perform the text field clearing here return true; } else { return false; } } <input type="radio" ... onclick="return clearText();"/> returning false in the onclick handler suppresses the radio button from being selected. Hope that helps, Roger