2 Replies Latest reply on Mar 6, 2007 6:55 PM by ntsiii

    xml and dynamic html links

    j_ellison
      I have an external xml file with a list of products, descriptions, and .pdf downloads. Everything works except the pdf download part (the images load, the descriptions load, but I cant get the dynamic links to work).

      Here's a snip of my xml file. There is no problem with the xml file. I'm sure of it.

      <product title="Product One" info="This is product one." files="product_one.pdf"/>

      My problem is that I want the url to change as the products change. Can someone tell me the correct html syntax for use in the text area? The below do not work. The first one is obviously wrong. The second feels correct - fails.

      <a href="http:/ /mywebsite.com/pdfs/{pt.selectedItemIndex.files}">Download PDF</a>

      <a href=\"http:/ /mywebsite.com/pdfs/" + {pt.selectedItemIndex.files} + "\" >Download PDF</a>

      Any help is appreciated.





        • 1. xml and dynamic html links
          j_ellison Level 1
          I found a very inelegant solution:

          In my xml file, I changed:

          <product title="Product One" info="This is product one." files="product_one.pdf"/>

          to the following:

          <product title="Product One" info="This is product one." files="&lt;a href='http:/ /my_web_site_dot_com/pdf/1.pdf' target='_blank'&gt;Download Product One Data&lt;/a&gt;"/>

          Apparently, one has to use &lt and /a&gt tags 'cuz. in xml docs..well just 'cuz.

          The {pt.selectedItemIndex.files} works fine as my declaration in the textField. Everything works "fine."

          Yea, it works, but it's so unprofessional. Wish someone could help with the real solution.
          • 2. Re: xml and dynamic html links
            ntsiii Level 3
            Did you try:
            <a href="{'http:/ /mywebsite.com/pdfs/' + pt.selectedItemIndex.files}">

            Tracy