Created
June 28, 2010 16:34
-
-
Save bangpound/456066 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* reset all the radio buttons with a given name | |
* | |
* @param string fieldName | |
* @param object form | |
* @return null | |
*/ | |
function unselectRadio(fieldName, form) | |
{ | |
for( i=0; i < document.forms[form].elements.length; i++) { | |
if (document.forms[form].elements[i].name == fieldName) { | |
document.forms[form].elements[i].checked = false; | |
} | |
} | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a onclick="unselectRadio('gender', 'Main');return false;" title="unselect" href="#">unselect</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from js/Common.js in CiviCRM 3.1.5.