Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forcing Uppercase 1

Status
Not open for further replies.

bkoltys

Programmer
Apr 11, 2001
8
US
How do I force uppercase for a &quot;log-in&quot; field? Trying to make it so when a user types in his/her name in the &quot;log-in&quot; field, it will force upper case. Seems it would be an easy tag <UPPER> but thats not the case.
 
This is a javascript question.

put this in the <input> tag for your login field:
[tt]onBlur='MakeUpper(this)'[/tt]
That will fire an event every time the text box loses focus.

then put this inside the <head> tags in your html page
[tt]<script>
function MakeUpper(obj) {
obj.value = obj.value.toUpperCase();
}
</script>
[/tt]

This function takes an form element object and makes it's value upper case.

Catch my drift?
I hope this helped! ;-)
- Casey Winans
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top