tibberous Posted July 27, 2008 Share Posted July 27, 2008 I have a javascript page that have a big array of names. I want to be able to have the user enter a search string, and it return the names that match. I was going to just build a long html string of the results, and set the innerHTML of a div, but it seems to break in IE if a lof of results are returned (only like 200). Is there a better way to handle this? Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 27, 2008 Share Posted July 27, 2008 I can't think of any reason why it would break. Can you provide a link to a page with the problem in question? Quote Link to comment Share on other sites More sharing options...
tibberous Posted July 27, 2008 Author Share Posted July 27, 2008 It breaks because of the length. It is browser specific and sometimes varies even between requests. I was able to fix it by using the DOM methods addChild and removeChild. When I still use innerHTML, it is only for small chunks at a time, and since I create one single div in memory, and then attach it, it runs great. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.