XML : Creating hyperlink from returned XML API

So I havea amember area that is written in Cold Fusion and it has a search function that hits an XML API and returns criminal data. The API gets parsed out onscreen and all is well.

Recently the feed changed and has a mugshot node now being passed back in addition to all the usual data. I wrote the below code to try to display what is returned in the node, which is a URL to the image, right after "Mugshot:". That I can get to display perfectly in the result set, but I don't want that because it is embedded text and isnt clickable. Here is the code:

      <tr><td><strong>Mugshot:</strong></td><td>#currRec.Mugshot.XMLText#</td></tr>    

What I would like is for it to say "Click Here To View" , which is hyperlinked to the URL that is returned. Upon clicking, opens a small window for the image so members do not leave the page. In the event the node has no image (empty node) it simple states "Not Available" preferable in grey or some color like that.

thanks in advance

No comments:

Post a Comment