cancel
Showing results for 
Search instead for 
Did you mean: 

setFocus dynamic with string

Former Member
0 Kudos

Hi,

in an adobe form the Focus can be set with xfa.host.setFocus("Formfield"). In this case 'Formfield' is a hardcoded form field.

Is it also possible to set the focus dynamic with a string, which contains the fieldname?

e.g.

myField = myNode.value;

var hochkomma = '"';

var Formfield = hochkomma.concat(myField);

var Formfield = Formfield.concat(hochkomma);

xfa.host.setFocus(Formfield);

But this code doesn't work. Where's the problem?

Thx!

Accepted Solutions (0)

Answers (1)

Answers (1)

rub_alfonso
Explorer
0 Kudos

Hi Andreas,

try to put Formfield between "", that is :

xfa.host.setFocus("Formfield");

And Formfield has to be the same as the name field, be careful respecting upper/lower case.

Regards.