Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need to globalize function...

0 views
Skip to first unread message

Ken Silanskas

unread,
Jun 29, 2003, 4:28:44 PM6/29/03
to
Hi all,
I need to globalize the following piece of code in a function so that it
applies to all instances of an input text field. It capitalizes the first
letter if the user forgets. Thanks in advance

myOutput.onKillFocus = function(){
myOutput.text = myOutput.text.substr(0,1).toUpperCase() +
myOutput.text.substr(1);
}

Thanks
-Ken


Wiebe Tijsma

unread,
Jun 30, 2003, 4:49:49 AM6/30/03
to
Hi,

Try this:

TextField.prototype.onKillFocus = function(){
this.text = this.text.substr(0,1).toUpperCase()+ this.text.substr(1);
}

Luck, Wiebe

"Ken Silanskas" <ksi...@dillstarproductions.com> wrote in message
news:bdni6a$sb9$1...@forums.macromedia.com...

0 new messages