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!
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!