How do I use javascript or formcalc to reference child controls (not by name)


hi everyone,

 

i've created ton of reports in past, , i'm looking @ creating reusable objects other people can use advanced form functionality without having learn use scripts.

 

a lot of coding acheived using this, .parent, etc. can rename controls , subforms without having worry breaking scripts. 1 issue having of code looks @ children controls, , references them name (for example, have code uses setfocus move user first field in subform).

 

in languages, there ways refer child controls via indexer or items/children array. i.e. subform.items[0].rawvalue.

 

i know pose issues, think sort out, if knew start. there way reference child control without it's name?

 

thanks help!

 

- scott

hi scott,

 

the subform has nodes collection can loop though, suspected.  if might show more want can test classname see if field , ui.oneofchild.classname work out type of field. so;

 

for (var = 0; < subform1.nodes.length; i++)

{

    var n = subform1.nodes.item(i);

    console.println(n.classname + " " + n.name + " " + n.ui.oneofchild.classname);

}

 

hope helps.

 

bruce



More discussions in LiveCycle Designer


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support