Forum Moderators: not2easy
Here is a simple test with 8000 absolutely positioned divs with anchors in them with a hover behavior: <snip>
IE displays 2048 properly and then just prints naked html on the rest of them.
I need this to work to display a scatter graph with links.
Any solutions to this or do I just bounce IE users when I want to display my graph?
[edited by: DrDoc at 7:25 pm (utc) on April 9, 2009]
Many times although you can do a thing one way, it doesn't mean you should. I don't know if this is the proper approach for something of this magnitude.
Even though you can get 2048 "layers" to render, consider users who have strained memory environments. Heavy browser demands can not only choke the browser, users might see it as a computer freeze (because the computer stops responding until the browser digests the content. I have seen this with too many too-long select lists, for example (and that was only a couple hundred.)
I can think of two superior methods of doing what you are doing, ones that will not choke up any browser and will provide a faster, more consistent experience to your end users. However, they will probably require some education on your part.
The first would be to use the server-side compositing capabilities of ImageMagick or possibly GD library, which are available to both Perl and PHP and probably others. This will require a little mojo in server side scripting. Whatever scripting you're doing to create your graphs can be applied there.
The second is to do the entire graph in Flash, using an external XML file to import dynamic data. This would require knowledge of Flash and ActionScript programming. If you're working with Javascript, A.S. is very similar and a relatively easy transition.
I did it with GD before and it works fine, but then I wanted to add interactivity to the graph, so I layered a few divs above the GD generated image. Then I wanted more and layered a few more until I decided to get rid of the image itself and do the whole graph with absolutely positioned divs.
Chrome and Firefox deal with this easily, with no noticeable memory overheads. It even works on my mobile.
Haven't tried to generate them dynamically client-side. It might be a solution to destroy the invisible components, that have something layered over them.
Flash would work, but I thought HTML was nicer, and more accessible. Plus, Flash would still use just as much, if not more memory.
If it's possible to display a table with gazillions of cells, why would it be such a strain to layer a few thousand divs? I am leaning on considering this a bug in IE.