I am using a dropdown list to select a court location.
When the location is selected,
the address field and the phoneNo field are updated according to the location selected.
I have tried in vain to get the website field populated with a rich text hyperlink.
I tried to save the rich text in a variable, but ES4 gives me an error for the escaped quotes (\")
var sLoc = "Abbotsford"; #
var oLink = "<bodyxmlns=\"http://www.w3.org/1999/xhtml\"xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\"><pstyle=\"letter-spacing:0in\"><ahref=\"http://www.provincialcourt.bc.ca/court-location/" + sLoc + "\"style=\"margin-top:0pt;margin-bottom:0pt;text-valign:bottom;font-family:'Hel vetica';font-size:8pt\">" + sLoc + "</a></p></body>";
courtWebsite.value.exData.loadXML (oLink, false, true);
When I change the escape quotes to single quotes, I don't get an error but:
- the PDF preview shows that the update does not work ; and
- when I return to the XML view, the variable is empty where the rich text content used to be. (var oLink = "") and the content of the oLink variable is now a child of the <script> element of the event.
BTW, it does not resolve the content of sLoc; so I replaced sLoc within oLink with the actual content... same problem.