Doubt regarding the implementation of div tag in javascript funcion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Subashini Sekhar
    New Member
    • Sep 2006
    • 1

    Doubt regarding the implementation of div tag in javascript funcion

    Hi ,

    I am working in ajax using a javascript file and a jsp file. Its a tree generation and I need to place div tag under all the nodes that have children. The div tag needs to be placed in the javascript file as a function in the js file is responsible for adding the nodes in the tree. I feel stuck in this place as I dont know how to use a div tag in a javascript function. I am not supposed to use the document.write function here as the request is dynamic and the page does not get reloaded after the request is made.


    Thanks
  • phpmaet
    New Member
    • Sep 2006
    • 27

    #2
    Hi,
    you can load the all AJAX response content in the DIV ID.


    Code:
    document.getElementById("DIV_ID").innerHTML="";
    document.getElementById("DIV_ID").innerHTML=HTTP.responseText;
    Thanks

    Comment

    Working...