|
|||||||
| General OpenLaszlo Programming Questions and discussions about coding in OpenLaszlo. Please include the release of OpenLaszlo you are developing in. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all,
I wish to create a simple text string concatinated from values held within a xml file. The xml content will contain the following <pages> <item> <title>BBC News</title> <link>http://www.bbc.co.uk/news</link> </item> </pages> I wish to generate within a <text> tag with the following text. <a href="http://www.bbc.co.uk/news" >BBC News</a> I have created a <class> which is provided the item context of the XML document. There are many item records, so the class will be called for each row. Currently I have the following <text> element defined. <text name="tabName" fontsize="10" datapath="title/text()" font="vera" width="180"> <method name="applyData" args="d"> this.setText( '<a href="" target="_blank"><u><u>' + d + '</u></a>' ); </method> </text> I wish to add the content of the link element to the href attribute. Can anyone advise me on how I may change the datapath="title/text()" to datapath="." then within the method "applyData" reference the 'title' and 'link' elements when concatenating the string? All help welcome. Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|