Greetings,
Please forgive me if this has been asked and answered. I am currently working in Adobe Designer (complete newbie) and I am sure I need javascript to accomplish the following: I have two radio buttons (1) Purchaser and (2) Contractor; there are multiple references throughout the document that should change to either "Purchaser" or "Contractor" depending on which of the radio buttons is selected.
NOTE: The radio buttons are grouped (porc)
NOTE: Script exists but not working and I am attempting to remedy as this form is needed.
The following is the javascript present when looking at the radio button "group" in design mode:
form1.Page1.sect1.porc::change - (JavaScript, client)
if (this.rawValue == "1") {
xfa.resolveNode("form1.Page1.sect2.contractorTxt.value.#text").value = "Purchaser";
xfa.resolveNode("form1.Page1.sect3.Name.caption.value.#text").value = "Name of Purchaser";
xfa.resolveNode("form1.Page1.sect3.Address.caption.value.#text").value = "Address of Purchaser";
xfa.resolveNode("form1.Page1.sect3.City.caption.value.#text").value = "City of Purchaser";
xfa.resolveNode("form1.Page1.sect3.SignatureField2.caption.value.#text").value = "Signature of Purchaser";
xfa.resolveNode(“form1.Page1.nonCorporate.Name[0].caption.value.#text”).value = Name of Purchaser”;
xfa.resolveNode(“form1.Page1.nonCorporate.Address[1].caption.value.#text”).value = Street Address of Purchaser”;
xfa.resolveNode(“form1.Page1.nonCorporate.Name[1].caption.value.#text”).value = Name of Purchaser”;
xfa.resolveNode(“form1.Page1.nonCorporate.Address[0].caption.value.#text”).value = Street Address of Purchaser”;
xfa.resolveNode("form1.Page2.Corporate.contractorTxt.value.#text").value = "Purchaser";
xfa.resolveNode("form1.Page2.Corporate.contractorTxt2.value.#text").value = "Purchaser";
//xfa.resolveNode("form1.Page1.sect3.SignatureField2.caption.value.#text").value = "Signature of Purchaser";
}
else {
xfa.resolveNode("form1.Page1.sect2.contractorTxt.value.#text").value = "Contractor";
xfa.resolveNode("form1.Page1.sect3.Name.caption.value.#text").value = "Name of Contractor";
xfa.resolveNode("form1.Page1.sect3.Address.caption.value.#text").value = "Address of Contractor";
xfa.resolveNode("form1.Page1.sect3.City.caption.value.#text").value = "City of Contractor";
xfa.resolveNode("form1.Page1.sect3.SignatureField2.caption.value.#text").value = "Signature of Contractor";
xfa.resolveNode(“form1.Page1.nonCorporate.Name[0].caption.value.#text”).value = Name of Contractor”;
xfa.resolveNode(“form1.Page1.nonCorporate.Address[1].caption.value.#text”).value = Street Address of Contractor”;
xfa.resolveNode(“form1.Page1.nonCorporate.Name[1].caption.value.#text”).value = Name of Contractor”;
xfa.resolveNode(“form1.Page1.nonCorporate.Address[0].caption.value.#text”).value = Street Address of Contractor”;
xfa.resolveNode("form1.Page2.Corporate.contractorTxt.value.#text").value = "Contractor";
xfa.resolveNode("form1.Page2.Corporate.contractorTxt2.value.#text").value = "Contractor";
//xfa.resolveNode("form1.Page1.sect3.SignatureField2.caption.value.#text").value = "Signature of Contractor";
}
form1.Page1.sect1.porc.purc::change - (JavaScript, client)
if (this.rawValue == "1") {
//xfa.resolveNode("form1.Page1.sect2.contractrTxt.text.value.text").value = "Purchaser";
//xfa.resolveNode("form1.Page1.sect.proxysign").presence = "visible";
//xfa.resolveNode("form1.Page1.claimantSignature.Employee_Certify.caption.value.#text").value = "I certify that this claim is true and correct to the best of my knowledge and belief and that the claimant has not received reimbursement for these expenses.";
}
else {
xfa.resolveNode("form1.Page1.sect2.contractorTxt.value.#text").value = "Contractor";
xfa.resolveNode("form1.Page1.sect3.Name.caption.value.#text").value = "Name of Contractor";
xfa.resolveNode("form1.Page1.sect3.Address.caption.value.#text").value = "Address of Contractor";
xfa.resolveNode("form1.Page1.sect3.City.caption.value.#text").value = "City of Contractor";
xfa.resolveNode("form1.Page1.sect3.SignatureField2.caption.value.#text").value = "Signature of Contractor";
xfa.resolveNode(“form1.Page1.nonCorporate.Name[0].caption.value.#text”).value = Name of Contractor”;
xfa.resolveNode(“form1.Page1.nonCorporate.Address[1].caption.value.#text”).value = Street Address of Contractor”;
xfa.resolveNode(“form1.Page1.nonCorporate.Name[1].caption.value.#text”).value = Name of Contractor”;
xfa.resolveNode(“form1.Page1.nonCorporate.Address[0].caption.value.#text”).value = Street Address of Contractor”;
xfa.resolveNode("form1.Page2.Corporate.contractorTxt.value.#text").value = "Contractor";
xfa.resolveNode("form1.Page2.Corporate.contractorTxt2.value.#text").value = "Contractor";
//xfa.resolveNode("form1.Page1.sect3.SignatureField2.caption.value.#text").value = "Signature of Contractor";
}
Please provide detailed instructions, as I am new to javascript and the Adobe Designer interface.
Any assistance you can provide would be greatly appreciated.
Thanks in advance.
~J