slayeroffice - web experiments gone horribly awry

09.27.2004 - Slide Show IV

A pretty direct rewrite of Travis Beckham's Flash based "Resizing Slide Show", found on his site listed as #1, I give you Slide Show IV. The only significant difference is that I didnt include the indicator slide (where the box slides from the active index to the new index).

It works in MSIE6, Mozilla, Firefox, NS6+ and Opera 7.5 pretty well, minus the opacity treatment in Opera. Safari has an issue where the navigation element disapears after the first transition and I've no clue why. If anyone can figure it out, let me know.

A couple of interesting discoveries while writing this - first, Opera 7.5 ignored my programatic plea to set the image's display to block and it turns out the cause was my overly zealous selector:

#mContainer #imageContainer img { display:none; }

When I changed it to

#imageContainer img { display:none; }

it was fine.

I don't know if thats an Opera bug or the way it should be, but I'll have to make a note to not do favelet style selectors when not writing a favelet.

Lastly, MSIE refuses to return the proper dimensions of an image who's display is set to none. It will return 0x0, which makes sense - except that I am requesting the dimensions with getAttribute and even tried a custom function that loops over attributes to get at them.

I ended up having to assign two bogus attributes, xwidth and xheight, in order to grab the image dimensions from the script. Again - I dont know if this is a bug or the way its supposed to work, but it seems to me that if I am asking for an attribute value, it should return whats in the attribute, not what the browser has computed it to be.

The real reason why you can't get the dimensions in the IE is, that the IE does not evel noad the images when display: none. even when it was visible on load, later it gets removed from the parse tree... That's what I found out in my test cases... dunno if it's the same case for you, but I guess I 'm right.

You should rather forget the IE for serious webapps. I know the nightmares of coding a 2000-line javascript-app in mozilla with a clean DOM interface, and later porting it to IE. It turned out that it was technically impossible, and so they got a crippled version. And I went out of the company because I could not stand their incompetence anymore for forcing me to do it on IE for a "internal only"-webapp. ;)
Posted by The real reason... on October 26, 2004 @ 1:26 am

Comments have been closed for this post.