getvar and setvar methods- getting string converting to caps

Hello all,

I want to take the input from a text box in SL "lastname" with the getvar method, use touppercase and pass the upper case string to "capslastname"  back to SL with javascript.  

here's what i have- i'm sure im missing something!

var caps=player.GetVar ("lastname");          //here i'm trying to grab 'lastname' from SL and assign to caps var
var caps2=caps.toUpperCase();               //converting caps to upper case and assigning to caps2
player.SetVar("capslastname",caps2);    //pushing upper case var back to storyline

1 Reply
Randy Richardson

Considering JS has "issues" running on different browsers/operating systems on pcs/macs and I received no responses on here, I knew had to come up with an alternative method.

Instead of forcing uppercase (caps) with javascript, I took the font i was using and made all the characters all caps.  I used a free font editor called Type Light to build my new uppercase font.  Now, anywhere I have to have all caps i use my all caps font.  With this work around, no complicated javascript is required.