You are here: irt.org | FAQ | JavaScript | Text | Q303 [ previous next ]
Use the toUpperCase() method on each and every form field:
<SCRIPT LANGUAGE="JavaScript"><!-- function convert() { document.myForm.myText1.value = document.myForm.myText1.value.toUpperCase(); document.myForm.myText2.value = document.myForm.myText2.value.toUpperCase(); } //--></SCRIPT> <FORM NAME="myForm" onSubmit="convert()"> <INPUT TYPE="TEXT" NAME="myText1"> <INPUT TYPE="TEXT" NAME="myText2"> <INPUT TYPE="SUBMIT"> </FORM>