Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / April 2005



Tip: Looking for answers? Try searching our database.

XML to dynamic text field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MORZ - 27 Apr 2005 18:27 GMT
New to XML. This is probably basic. Trying to load titles of lessons from an XML file to individual dynamic text fields without using a component. Any quick solves?

MORZ
tomeanand@hotmail.com - 28 Apr 2005 05:32 GMT
hi MORZ

try this out

/*********XML *************/
<?xml version="1.0" encoding="iso-8859-1"?>
    <books id="2" name="Type">
        <title id="1">one</title>
        <title id="2">two</title>
        <title id="3">three</title>
        <title id="4">four</title>
        <title id="5">five</title>
    </books>
/*********actions***********/
var myXML:XML = new XML()
var title_array:Array = new Array()
myXML.ignoreWhite = true
myXML.load("title.xml")
myXML.onLoad = function(success)    {
    if(success)    {
        child_length = this.firstChild.childNodes
        for(var i=0; i<child_length.length; i++)    {
            title_array.push(child_length.firstChild)
        }
    }
}
/***************************************************/
you will get all the title in the title_array
show the elements of arrys in your textfield

i guess this will help you

Anand
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.