# Basic news like site

**URL:** <https://forum.kirupa.com/t/basic-news-like-site/210454>\
**Category:** flash\
**Created:** [December 18, 2006, 10:06pm UTC](https://forum.kirupa.com/t/basic-news-like-site/210454 "2006-12-18T22:06:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dolphin\_m70](https://avatars.discourse-cdn.com/v4/letter/d/c77e96/32.png) [@dolphin\_m70](https://forum.kirupa.com/u/dolphin_m70)\
**Post date:** [December 18, 2006, 10:06pm UTC](https://forum.kirupa.com/t/basic-news-like-site/210454/1 "2006-12-18T22:06:18Z")

</div>

hi frs

pls chk the code below  
this is just to display a news like display in a texbox component  
the file is a XML file (headlines)  
what happen is when the file is loaded it displays a news like site

headlineXML = new XML();  
headlineXML.onLoad = myLoad;  
headlineXML.load(“headlines.xml”);  
function myLoad(ok) {  
if (ok == true) {  
Publish(this.firstChild);  
}  
}

function Publish(HeadlineXMLNode) {  
if (HeadlineXMLNode.nodeName.toUpperCase() == “BROADCAST”) {  
content = “”;  
story = HeadlineXMLNode.firstChild;  
while (story != null) {  
if (story.nodeName.toUpperCase() == “STORY”) {  
lead = “”;  
body = “”;  
URL = “”;  
element = story.firstChild;  
while (element != null) {  
if (element.nodeName.toUpperCase() == “LEAD”) {  
lead = element.firstChild.nodeValue;  
}  
if (element.nodeName.toUpperCase() == “BODY”) {  
body = element.firstChild.nodeValue;  
}  
if (element.nodeName.toUpperCase() == “URL”) {  
URL = element.firstChild.nodeValue;  
}

```
                 if (element.nodeName.toUpperCase() == "DETAILS") {
                    DETAILS = element.firstChild.nodeValue;
                }
                element = element.nextSibling;
            }
            [COLOR=DarkRed]**content += "&lt;font size='+2' color='#3366cc'&gt;&lt;a href='"+URL+"'&gt;"+lead+"&lt;/a&gt;&lt;/font&gt;&lt;br&gt;"+body+"&lt;br&gt;&lt;br&gt;";
            txt.htmltext=content;**
        }[/COLOR]
        story = story.nextSibling;
    }
}

```

}

[COLOR=Red]example

\<link\>This is the Headlines\</link\>  
this is the headlines. this is the message[/COLOR] [COLOR=DarkRed]“more\>\>”[/COLOR]

what i want is to add a “more\>\>” link like we do in “read more”  
and when cliking the link the DETAILS element’s value should be displayed in the new window and  
cud anyone pls tell me how i can i do that  
it cud be a gr8 help  
thx  
:cop:
