Click to See Complete Forum and Search --> : Forms - All Upper Case


maradona
03-17-2003, 02:58 PM
I have downloaded this script, and it works just as described. Unfortunately it only does half the job for me.

http://javascript.internet.com/forms/all-upper-case.html

If the user clicks the submit button (image) the script changes the characters to uppercase. However if after entering the items in the form field, they just hit enter to submit the information it does not change.

Does anyone have any ideas on how I can make this work for both options? Or is my best bet to disable using the enter button as submit (which im not sure how to do).

Thanks, maradona

AdamBrill
03-17-2003, 05:01 PM
Try this:
<form name="capsform" onsubmit="javascript:this.caps.value=this.caps.value.toUpperCase(); return true;">
<input type="text" name="caps" size=40 value="" onChange="javascript:this.value=this.value.toUpperCase();">
<input type="submit" value="Ok!">
</form>That should work better for you... ;)

maradona
03-24-2003, 08:22 AM
Thanks a lot. That worked like a charm. Don't know who does the editing, but that should also be added to the original downloadable script, unless there is som downside that I am not seeing.

Anyhow, thanks for responding.

maradona