标签:messageBox Designer Adobe form xfa host setting var folder
Sent: Monday, June 11, 2007 9:27 AM
Put this script in the body page.
var dum = 0; startTraverse(dum); function startTraverse( dummy ) { var nodes = this.nodes; var length = nodes.length; for ( var i = 0; i < length;i++) { var subnode = nodes.item(i); traver(subnode.somExpression); } } function traver( folder ) // folder should be a subform's name; type:string { //xfa.host.messageBox("reslove:" + folder); var node = xfa.resolveNode(folder); var subnodes = node.nodes; var length = subnodes.length; for(var i = 0;i < length;i++) { //xfa.host.messageBox("name:" + subnodes.item(i).name); var classname = subnodes.item(i).className; var nodename = subnodes.item(i).name; if( classname == "subform") { //xfa.host.messageBox("it is a subform"); //xfa.host.messageBox(subnodes.item(i).somExpression); var passi = subnodes.item(i).somExpression; traver(passi); } else { //xfa.host.messageBox("not a subform:" + nodename); if(( classname == "field") || ( classname == "draw")) { isFieldSettingRight(subnodes.item(i)); //xfa.host.messageBox("acess:" + subnodes.item(i).access); var setting = subnodes.item(i).assist.speak.priority; var sompath = subnodes.item(i).somExpression; //xfa.host.messageBox("name:" + nodename + "setting:" + setting); //xfa.host.messageBox("sompath:" + sompath); } } } } function isFieldSettingRight( folder ) // folder should be a non-subform's name type:template path) { //xfa.host.messageBox("in isFunction!"); var type = folder.className; var setting = folder.assist.speak.priority; var isDisable = folder.assist.speak.disable; if( type == "draw" ) { if( isDisable != 1 ) { xfa.host.messageBox("wrong setting:" + setting + "Disable?:" + isDisable); xfa.host.messageBox("field: " + folder.somExpression + " wrong accessibility setting!:" + setting +" It should be set to NONE!"); return 0; } } else if ( type == "field" ) { if( folder.presence == "hidden" ) { if( isDisable != 1 ) { xfa.host.messageBox("Field: " + folder.somExpression + " Wrong acessibility setting!:" + setting+" It should be set to NONE!"); return 0; } } var captionsetting = folder.caption.reserve; // two condition -1 or positive number //xfa.host.messageBox("caption reserve:" + captionsetting); //xfa.host.messageBox("setting:" + setting); if ( captionsetting != "-1in" ) // has caption { //xfa.host.messageBox("into the condition that has caption!should set to caption!"); if( setting != "caption" ) { xfa.host.messageBox("Field: " + folder.somExpression + " should set to Caption"); } } } return 1; }
标签:messageBox,Designer,Adobe,form,xfa,host,setting,var,folder 来源: https://blog.csdn.net/i042416/article/details/96284641
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。