javascript - LiveCycle drop-down list reference another field in an If statement -


i have 2 drop-down lists, both of offer choice of other. when other chosen, text field ("other") becomes visible. if different option chosen, field hidden. don't want field hidden when different option list "tool" chosen, if list "cut" displaying other (or vice-versa). i'm missing here:

form1.rfq.body.requireditems.table1.row1.col2.types.tool::change - (javascript, client)  if(xfa.event.newtext == "other"){     other.presence = "visible"; }  else{     if (cut.caption == "other"){         other.presence = "visible";     }     else{         other.presence = "hidden";     } } 

if want "other" textfield show if both options other, need in both drop down lists' exit event.

if(tool.rawvalue == "other" && cut.rawvalue == "other") other.presence = visible; else other.presence = "hidden"; 

using exit event work "change" event long have "commit on: select" chosen in object palette. that's default option.

if want visible if either of drop down lists shows "other" want code:

if(tool.rawvalue == "other" || cut.rawvalue == "other") other.presence = visible; else other.presence = "hidden"; 

Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -