Open a link from Text Area that takes partial data from Document property


My requirement is to show the link in text area that opens a Spotfire file in webplayer however the document property will changes if the link should point to different server (e.g. Dev or Tet). Please advise how to achive this. I could find couple answers related to read document property value using javascript however not sure how the HTML code will get the changes document property value and open a link.