jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree tree inside a div

This topic contains 0 replies, has 1 voice, and was last updated by  joyce973 11 years ago.

Viewing 1 post (of 1 total)
  • Author
  • tree inside a div #55844

    joyce973
    Participant

    Hello everybody,
    I’m trying to embed a tree inside a div of a page, by using XMLHttpRequest, but it is not shown inside the page.
    If I load the tree outside the main page, it works.

    Here is the code of the main page (the div name is “tree”, the tree page name is “tree.asp”:

    function visualizza_tree()
    {
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
    tree= new XMLHttpRequest();
    tree.onreadystatechange = carica_tree;
    tree.open(“GET”, “tree.asp”, true);
    tree.send();
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
    tree= new ActiveXObject(“Microsoft.XMLHTTP”);
    if (tree) {
    tree.onreadystatechange = carica_tree;
    tree.open(“GET”, “tree.asp”, true);
    tree.send();
    }
    }
    }

    function carica_tree() {
    var visTree;
    if (tree.readyState == 4) {
    visTree=tree.responseText;
    document.getElementById(‘tree’).innerHTML = visTree;
    }
    }

    Any help?
    thank you
    Antonio

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.