-
HTML Format of XML attributes not working
Hi there,
I've got some xml in attribute format but I need to make one of the words bold. Sounds simple. I've done a search on this forum and the web looking for help but it's not really helping much.
I can get the <b></b> tags to show up correctly in the dynamic text box but it doesn't actually bold the word.
here is my code:
XML
PHP Code:
<articles>
<article
image="hero.jpg"
title="<b> EDRA: </b> GLOBAL TALENT MAGNET "
intro="Vestibulum in quam vel nisi dapibus facilisis."
body="
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum in quam vel nisi dapibus facilisis. Sed laoreet turpis vel mi. Curabitur nunc pede, pharetra sed, luctus at, molestie eu, lacus.
Curabitur fringilla facilisis nulla. Quisque volutpat ante id lectus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In hac habitasse platea dictumst.
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Ut tincidunt nisi quis ipsum. Suspendisse volutpat. Vivamus enim. Pellentesque vel sapien eget tellus porta aliquet."
blogQuote=""
blogLink=""
/>
</articles>
I think I'm using the correct tags but the output is <b>EDRA:</b> Global....
Is it possible to format attributes?
Cheers
Matt
-
FK'n_dog
html enable the dynamic textfield
xx = new XML();
xx.ignoreWhite = true;
xx.load("xml.xml");
xx.onLoad = function(){
aNode = this.firstChild.childNodes;
Title = aNode[0].attributes['title'];
txt.html = true;
txt.htmlText = Title;
}
Last edited by a_modified_dog; 04-21-2008 at 07:09 AM.
-
FK'n_dog
or make use of a CDATA section
PHP Code:
<articles>
<title><![CDATA[<b>EDRA:</b> GLOBAL TALENT MAGNET]]></title>
<article image="hero.jpg"
intro="Vestibulum in quam vel nisi dapibus facilisis."
body="Lorem ipsum dolor sit amet, consectetuer adipiscing."
blogQuote=""
blogLink="" />
</articles>
PHP Code:
xx = new XML();
xx.ignoreWhite = true;
xx.load("xml.xml");
xx.onLoad = function(){
aNode = this.firstChild.childNodes;
Title = aNode[0].firstChild.nodeValue;
txt.html = true;
txt.htmlText = Title;
}
-
I'm having the same problem, but Evelyn's, (sorry, _modified dog ; ) ) isn't doing the trick for me.
Anyone else have any suggestions on this problem?
Thanks!
-
You are doing good, but you have to use in the dynamic text field: htmlText not text. That's it.
Hek.
Greetings from Costa Rica.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|