By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,521 Members | 1,259 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,521 IT Pros & Developers. It's quick & easy.

Doubt regarding the implementation of div tag in javascript funcion

P: 1
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
Sep 28 '06 #1
Share this Question
Share on Google+
1 Reply


P: 27
Hi,
you can load the all AJAX response content in the DIV ID.


Expand|Select|Wrap|Line Numbers
  1. document.getElementById("DIV_ID").innerHTML="";
  2. document.getElementById("DIV_ID").innerHTML=HTTP.responseText;    
Thanks
Sep 28 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.