Livecycle scripting help please!
hi all,
i'm new adobe livecycle (but have fair amount of scripting experience), i'm trying word count of text field on form. thought able simple using wsh:
mystr="this test string 8 words";
lengthofmystr = mystr.split(" ").length;
wscript.echo(lengthofmystr)
but when put similar (but modified correctly livecycle) event on text field (using exit event test) nothing happens:
form1.#subform[0].sf2.textfield2::exit - (javascript, client)
mystr=this.rawvalue;
lengthofmystr=mystr.split(" ").length;
xfa.host.messagebox(lengthofmystr, "test message", 3);
is possible? ideas?
mike
mike,
you close. split returns array, not string.
// form1.page1.subform1.foo::exit - (javascript, client)
var wordcnt = new array();
var str = this.rawvalue;
wordcnt = str.split(" ");
xfa.host.messagebox("there " + wordcnt.length + " words.");
steve
More discussions in LiveCycle Designer
adobe
Comments
Post a Comment