On Sep 15, 10:17 pm, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> Oh, just read your message again. I'd say make your "widget" page fix
> itself. I'm not sure how cross platform this is, but cursory testing
> indicates that you can do:
>
> if(window.parent == window) {
> // standalone page
>
> } else {
> // in iframe
> }
>
Ok, that is what I was looking for - atleast to explore it with the
page checking itself.
> Or maybe you could do it server side, either by passing an extra
> parameter, or by checking the referer header (depending on how your
> pages are setup).
Yes, another approach. Let me try the above.... Ok, just need to find
the body color:
if(window.parent != window) {
// in iframe
var e = parent.document.getElementById("iFrameDetails");
var bc = $.curCSS(e.ownerDocument.body,"backgroundColor");
console.log("bodyColor: ",bc);
$("body").css("background",bc);
}
This seems to get the right color, but in rgb format which I don't
think the .css method looks for. Also, I was trying to the the parent
body without requiring the iframe reference.
Still plugging away, but if you have the answer, that will be just
great. :-)
I appreciate your expertise.
---
HLS