I am new here and want to get some help for speeding up and resolving IE issue while creating tree using ajax.
My tree contains radio buttons at each level and I am getting all tree data from database. To speed up, what I am doing is to have tree in session at server side
and whenever ajax needs the tree , it sends appropriate tree key request and get the tree object from server.
My problem starts while processing huge tree. I have products tree object which is very huge and IW is taking 15 secs to build the tree and also hangs for 15 seconds. Firefox and mozilla hands this tree creation pretty neatly.
I am also building this tree on back ground on page load so that I have the tree ready when user clicks on + sign to get the tree.
I am building tree by using this method recursively.
Expand|Select|Wrap|Line Numbers
- function createMLNode(tagId,tagDesc){
- var liElm = null;
- var radioElm = null;
- // Creating List Item - html tag
- liElm = document.createElement("li");
- liElm.id = tagId;
- // treeSelected is global variable contains information about
- // which tree + sign has clicked.
- radioElm = document.createElement('<input type="radio" name="'+ "radio_" + treeSelected + '" />');
- radioElm.className="height";
- radioElm.id = "radio-" + tagId;
- radioElm.onclick = function(evt) {selectTagIdForRadio(tagId , treeSelected);} ;
- liElm.appendChild(radioElm);
- liElm.appendChild(document.createTextNode(tagDesc));
- return liElm;
- }
Thanks for your valuable suggestions.
Shailesh