How to use dataformatas to make text a hyperlink

Discussion in 'JavaScript' started by lightlysalted, Dec 12, 2009.

  1. #1
    Hi All,

    Wonder if someone can help me with a problem. I have created a an xml file which i intend to host adverts in and which is seperate standalone file. I will then use javascript on my static HTML pages to acess this file and display these adverts.

    The reason for this approach is so that if I change an advert I don't have to go through 300+ pages of content to change each advert but can just alter them in my one xml text file. I know that i could do this with PHP but i don't want to change all the .html page extensions to my site.

    My problem is that my links i.e using the <a href=> format and stored in the XML file are being presented as plain text and not hyper links. I heard someone mention about how this can be overcome using the attribute dataformatas, but can anyone explain how I would do this.

    I.e would i use it within the xml file or in the javascript code on my static .html pages?:confused:
     
    lightlysalted, Dec 12, 2009 IP