Groß/Kleinschreibung-erster Buchstabe groß

  • nkh2016
  • nkh2016's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

nkh2016 created the topic: Groß/Kleinschreibung-erster Buchstabe groß

Hallo...
Habe ein Aktionscript.... dies sollte im Textfeld nach Verlassen alles in Großbuchstaben anzeigen..

function ff_nachname_action(elem, action)
{
if (action=='change')
elem.value = elem.value.toUpperCase();
return elem;
} // ff_ElementName_action


funktioniert.....

für alles in Kleinbuchstaben funktioniert auch..... Lowercase....

capitalize (für erster Buchstabe groß) funktioniert irgendwie nicht.....

Im Forum hier ist ein Beispiel mit capitalize,.... funktioniert bei mir aber nicht...

Danke im voraus....
#187451
  • Posts: 2666
  • Karma: 78
  • Thank you received: 328

lovre replied the topic: Groß/Kleinschreibung-erster Buchstabe groß

Hello,

sorry to answer you in English. Could you please try this code:
function ff_name_action(elem, action)
{
elem.value =elem.value[0].toUpperCase() + elem.value.substring(1);
}

Please let us know if this works for you.

Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================
#187664
  • nkh2016
  • nkh2016's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

nkh2016 replied the topic: Groß/Kleinschreibung-erster Buchstabe groß

Hi...
thank you... it works, but when

i fill the textbox with, for example "ghAnBnC" then is the result "GhAnBnC"...

for example "abcdefg" is no problem..... the result is "Abcdefg"....

Perhaps have you a solution for "ghAnBnC" ---> "Ghanbcn"

thanks and regards
#187698
  • Posts: 2666
  • Karma: 78
  • Thank you received: 328

lovre replied the topic: Groß/Kleinschreibung-erster Buchstabe groß

Hello,

This code should be fine for you then:
function ff_name_action(elem, action)
{
var rest = elem.value.substring(1);
elem.value =elem.value[0].toUpperCase() + rest.toLowerCase();
}
Please let us know how it works for you.

Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================
#187734
The following user(s) said Thank You: nkh2016
  • nkh2016
  • nkh2016's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0

nkh2016 replied the topic: Groß/Kleinschreibung-erster Buchstabe groß

Thank you - work fine...
#187872
  • Posts: 2666
  • Karma: 78
  • Thank you received: 328

lovre replied the topic: Groß/Kleinschreibung-erster Buchstabe groß

That's great.

Be sure to let us know if you have more questions for us.

Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================
#187906
Moderators: ForumSupporttomeperica
Time to create page: 0.064 seconds

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Special Offer! Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for only 55!

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, WordPress® plugins, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here