Help with a JavaScript email submit button taking word null out if blank
first of dont know java, wanted create submit button , did alot of research. i want button email pdf files have created in livecycle. so far everyting works code needs help.
there few fields want place in body of e-mail, if left blank dont want null apear on email subject or body.
here have far *this work around, not good.
strsubject = "account "+dropdownlist1.rawvalue+" for: " +last.rawvalue +", " +first.rawvalue +" " +mi.rawvalue; if (mi.rawvalue ==null || mi.rawvalue =="")strsubject = "account "+dropdownlist1.rawvalue+" for: " +last.rawvalue +", " +first.rawvalue;
4 fields working on first name, last name, mi , comments. first , last alwasy used, if mi not dont want null in there, have above works messy. i wanted same comments if left blank read "comments: none" not null
on if statement re did whole deal out the mi.rawvalue not right way... great.
thanks
may can try below..
var strdropdownlistvalue,strfirstname, strlastname, strmi
if(dropdownlist1.rawvalue == null || dropdownlist1.rawvalue == "")
strdropdownlistvalue = "";
else
strdropdownlistvalue = dropdownlist1.rawvalue;
if(first.rawvalue == null || first.rawvalue == "")
strfirstname = "";
else
strfirstname = first.rawvalue;
if(mi.rawvalue == null || mi.rawvalue == "")
strmi = "";
else
strmi = mi.rawvalue;
if(last.rawvalue == null || last.rawvalue == "")
strlastname = "";
else
strlastname = last.rawvalue;
strsubject = "account "+ strdropdownlistvalue +" for: " + strlastname +", " + strfirstname +" " + strmi;
thanks
srini
More discussions in LiveCycle Designer
adobe
Comments
Post a Comment