Log in

View Full Version : Continued: IE7 pain...



ItsMeOnly
09-12-2006, 08:47 AM
from http://www.dynamicdrive.com/forums/showthread.php?p=52803#post52803


When you mention 'parent.document' - that should be the document that holds the frame or iframe through which the current page is showing, or the page itself - if it is the 'top' document.

That's exactly what I'm refering: it works for iframes- but doesn't work for contents of <object data="mynicething.htm" type="text/html"></object>

The functions bail out on anything "parent.*", saying that "Object does not exist or is empty" (sometimes I get object "null" too!). When I get back to iframe, they work OK, so it's definitely error in object handling.


If you are having trouble accessing elements on the parent document, a function can be placed on the parent to handle that and accessed via:

parent.functionName('optional', 'arguments');

Good advice, will try it


The behavior of floated content in IE 6 is as though it already had an element placed below it with clear:both, which is what you need to do to get other browsers to behave as IE 6 does with floated content. The other browsers have it right and perhaps what you are mentioning is that IE 7 now follows the standard model.

Actually it's not that simple, I didn't need any workaround in both Opera, FF and IE6 (which could just stretch body to 100%+padding, if such was applied), IE7 can "snap" the parent of floated element to left edge of body, or even bump the floated element left or right out of bounds of parent (ironically, there is great deal of space left between floated elements, so they do not sum in width to something greater than 100% of parent div).
check this out http://rambo.id.uw.edu.pl/dvdengine.html

as for floating them down out of parent bounds: I actually use it often in designs, like here: http://sm.id.uw.edu.pl


I know that when IE 7 finally is released, it will probably require new kludges and workarounds. I'm just hoping that these will be less than the various betas would imply and I've chosen for now to ignore that browser (for the most part) until full release.
Well, we're not talking about beta anymore: that's Release Candidate now, so it's basically code "frozen" to release!

Twey
09-12-2006, 11:51 AM
doesn't work for contents of <object data="mynicething.htm" type="text/html"></object>That's not a problem. You shouldn't be using that anyway.
Well, we're not talking about beta anymore: that's Release Candidate now, so it's basically code "frozen" to release!When it comes out, officially stable, I'll start worrying about it. Of course, if Microsoft have done a half-decent job (argh! Sorry, got dive-bombed by a pig) we won't have to change our sites anyway.

ItsMeOnly
09-12-2006, 12:45 PM
[object]That's not a problem. You shouldn't be using that anyway.

It depends, as you know, there's no iframe in any of "strict" DTDs, and I'm tired of transitionals- although it seems I'm having to stick with them for a while (or ignore 62% of my site's vierews, which I don't think is pretty nice thing).


When it comes out, officially stable, I'll start worrying about it. Of course, if Microsoft have done a half-decent job (argh! Sorry, got dive-bombed by a pig) we won't have to change our sites anyway.
That's how I started to conclude after I discovered another pitfall that caused IE7 to display the contents of my site wrong (without any apparent error in design), I just though "screw it", and left the workarounds as they are...

mwinter
09-12-2006, 05:15 PM
... <object data="mynicething.htm" type="text/html"></object>

That's not a problem. You shouldn't be using that anyway.

Quite the contrary: that's one of the things the object element is meant to do. In fact, the object element could also replace the img element (the former has a better fallback facility), but poor browser support prevents practice use of either mechanism on the Web.




... there's no iframe in any of "strict" DTDs, and I'm tired of transitionals

You have three choices: use in-line frames with a Strict document and accept that it won't validate; live with using a Transitional document type; or, replace the in-line frames with something else. How you'd go about the latter depends on what you're using the frames to achieve.

Mike

ItsMeOnly
09-12-2006, 05:28 PM
live with using a Transitional document type;
Basically as you might have seen, my page simulates "desktop environment" (Indigo Magic Desktop, for that matter), the iframes->objects->iframes(back again) were used to achieve dynamic content in "window" areas, that otherwise would require reloading entire page- or implementing AJAX (which in fact will replace these in near future- together with building "window" classes, so everything will be contained within single desk... ermmmm... viewport, but for now I'm happy- ).

Transitional isn't going to hurt for now, and I'll wait until first service pack for IE7, and move completely XML anyway).