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: 1880
  • Karma: 57
  • Thank you received: 247

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.

===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
#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: 1880
  • Karma: 57
  • Thank you received: 247

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.

===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
#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: 1880
  • Karma: 57
  • Thank you received: 247

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.

===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
#187906
Moderators: ForumSupporttomeperica
Time to create page: 0.069 seconds

News and Updates

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

New extension AnalyticsAnywhere released!

Track website visitors no matter if ad blockers are enabled! Check it out!

Lifetime Subscription

Special Offer! Get lifetime access to all of our current and future products and 2 years of professional support -- 149 for only 90!

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, WordPress® plugins, Joomla!® templates   this means, by purchasing a Lifetime 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 1-Year or Lifetime 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!

Pro Support Renewal Plans

If you just need professional support and no further access to downloads or simply want or need to renew professional support, you may choose between various support plans from here.