473,386 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Tree Challenge: Dynamically Creating Radio tree- Very Slow in IE

1
Hi All,
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
  1. function createMLNode(tagId,tagDesc){
  2.     var liElm = null;
  3.     var radioElm = null;
  4.  
  5.     // Creating List Item - html tag
  6.     liElm = document.createElement("li");
  7.     liElm.id = tagId;
  8.  
  9. // treeSelected is global variable contains information about 
  10. // which tree + sign has clicked.
  11. radioElm = document.createElement('<input type="radio" name="'+ "radio_" + treeSelected + '" />');
  12.  
  13.     radioElm.className="height";
  14.  
  15.     radioElm.id = "radio-" + tagId;
  16.  
  17.     radioElm.onclick = function(evt) {selectTagIdForRadio(tagId , treeSelected);} ;
  18.     liElm.appendChild(radioElm);
  19.     liElm.appendChild(document.createTextNode(tagDesc));
  20.  
  21.     return liElm;
  22. }
Please help me so that I can encounter the IE hang issue or any other advice which can speed up tree building for large tree.

Thanks for your valuable suggestions.

Shailesh
May 21 '07 #1
1 1510
acoder
16,027 Expert Mod 8TB
It might be a memory leak, but not sure. You could try using innerHTML since it's faster.
Mar 1 '08 #2

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

Similar topics

2
by: Steve Black | last post by:
Hello, I am dynamically creating checkboxes on my web page based on data in a SQL Server table. Therefore, these checkboxes do not exist at design time and I cannot refer to them in my...
2
by: Amelyan | last post by:
I *finally* narrowed down my problem to my custom web control. If I hookup event inside dynamically created custom web control, it doesn't get fired. However, event gets fired for any other...
2
by: James P. | last post by:
Help, I need to display radio buttons on a form. The data is from SQL table: each row in each table is displayed as a radio button. I have multiple SQL tables so I understand I need to put...
2
by: epigram | last post by:
I'm dynamically creating a number of radio buttons on my aspx page based upon data read from a db. Each radio button has autopostback turned on. I'm experiencing two problems. 1) I am reading...
6
by: Tex | last post by:
I am writting a survey system web application. I am using ASP.Net 2, C# and MS SQL 2005. I am able to store surveys and questions associated to the surveys just fine. The problem I am having is...
5
by: stellstarin | last post by:
I have a html where fields are created and added dynamically on the client side. I use the AppendChild() call to create fields dynamically. On submit i try to get the value for all the...
2
by: robert112 | last post by:
This is quite a hard one guys. ***Some necessary back ground Info*** I have an asp.net 1.1 application that uses a WYSIWYG to return some html created by the user in the admin section of the...
7
by: sosamv | last post by:
Hi all!, I'm creating a app with PHP and MySQL, the system administrator is capable of creating profiles, on each profile we create, we add a custom access menu (a javascript tree view menu), theres...
7
by: moksha | last post by:
Hi, I am new to javascript and i am facing a problem in coding. plz help me out. I am using javascript for dynamically creating a table row which contains text boxes and radio...
0
by: swapnil1987 | last post by:
hello friends i am trying to find solution for this problem if u know something then please tell i am creating web application that runs on black berry. here i need to create selection list...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.