XWidgetSoft Forum https://bbs.xwidget.com/ |
|
uppercase via script https://bbs.xwidget.com/viewtopic.php?f=7&t=3553 |
Page 1 of 1 |
Author: | Dagedee [ September 19th, 2013, 11:38 am ] |
Post subject: | uppercase via script |
Hi, I would like to know how to get uppercase via script? I've tried already "object.style.fontVariant="uppercase", but it doesn't work. There is "js_function strVariable.toUpperCase() :string" in the "Script Auto Complete" - popup menu, but how exactly does this work? |
Author: | meme [ September 21st, 2013, 5:53 pm ] |
Post subject: | Re: uppercase via script |
Does this help ? function button1OnClick(Sender) { var OLDTEXT = " testing case conversion method "; var NEWTEXT = OLDTEXT.toUpperCase(); alert(NEWTEXT); } |
Author: | Dagedee [ September 22nd, 2013, 6:34 am ] |
Post subject: | Re: uppercase via script |
Hi meme, thank you for your help! Your script works fine but it isn't exactly what I mean. I only want a change from lower case letters to upper-case letters, but no alert. I could do this by using two different texts and hide/show text1/text2 etc., but I would prefer a solution via script if it is possible. It would be great if you know how to get this. uppercase_example.gif [ 1.67 KiB | Viewed 3923 times ] |
Author: | meme [ September 22nd, 2013, 6:23 pm ] |
Post subject: | Re: uppercase via script |
I am not sure when you want the case to change, but this code from a button press will change the case of text1. function button1OnClick(Sender) { var OLDTEXT = text1.text; var NEWTEXT = OLDTEXT.toUpperCase(); text1.Text=NEWTEXT ; } or in one line text1.Text=text1.Text.toUpperCase(); |
Author: | Dagedee [ September 23rd, 2013, 1:49 am ] |
Post subject: | Re: uppercase via script |
Yes, that's exactly what I want. Thank you very much!!! |
Author: | digigamer [ October 21st, 2013, 4:12 am ] |
Post subject: | Re: uppercase via script |
What about these? text1.UpperCase = true; |
Author: | Dagedee [ October 21st, 2013, 7:50 am ] |
Post subject: | Re: uppercase via script |
This works perfectly too! Thank you! |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |