dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: HTML textbox not displaying XML

  1. #1

    HTML textbox not displaying XML

    I have some XML being loaded into a flash movie - all works fine except
    when I try to add some HTML formatting to the data. The textbox has HTML
    formatting enabled.

    Any ideas? code below...

    PHP Code:

    var i=4;
    myXML = new XML();
    myXML.ignoreWhite true;
    myXML.onLoad convertXML;
    myXML.load("file.xml");
    function 
    convertXML() {
     
    rssTag this.firstChild.firstChild;
     
    numItems rssTag.childNodes.length-(i-2);
     
    setPage(i);
    }
    function 
    setPage(i) {
     
    items rssTag.childNodes[i];
     
    value1 items.childNodes[0];
     
    value2 items.childNodes[1];
     
    value3 items.childNodes[2];

    //this works fine...
    // _root.result = "1 ="+value1+", 2="+value2+", 3="+value3;

    //this doesn't display anything...
    // _root.result = "<a href=\""+value2+"\">"+value1+"</a><br>"+value3;

    //this works and displays fine...
    _root.result "<a href=\"test.htm\">test</a>";


    Last edited by mixart; 10-27-2003 at 10:01 PM.
    Mick Gow
    ----------------------------------

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Location
    Texas
    Posts
    348
    dont know a lot bout the xml.. or the a/s for that matter. but, instead of

    myXML.onLoad = convertXML

    try

    myXML.onLoad = convertXML()
    Great minds think for themselves.

  3. #3
    FYI - solution was fixed. I was pointing to the wrong node - not the exact value of the node.

    The node I was pointing to had a value of:
    <link>http://wwww.this.com</link>

    I need to point to the node value of:
    http://www.this.com

    - Mick
    Mick Gow
    ----------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center