javascript - Get current field name in to change display option? -
i've looked afternoon try , find one. basically, want name of current text field , change display value noprint if text field value "--". i'm running validation script in pdf. appreciated!
if(event.value == '--') { event.target.name.display = event.target.name.display.noprint; } else { event.target.name.display = event.target.name.display.visible; }
you have couple of things bit off.
event.value
doesn't exist (you can check available event properties)
if want value of element triggered event can do:
var elemvalue = event.target.value;
if want name same element can do:
var elemname = event.target.name;
to hide element printing, can see this answer.
Comments
Post a Comment