Quantcast
Channel: Adobe Community : Discussion List - LiveCycle Forms
Viewing all articles
Browse latest Browse all 1160

How do I update a text field by assigning an hyperlink with loadXML in ES4?

$
0
0

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:

 

  1. the PDF preview shows that the update does not work ; and
  2. 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 replaced sLoc within oLink with the actual content... same problem.


Viewing all articles
Browse latest Browse all 1160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>