I have made a html page and two website take it on her website like a frame.
I want to change the color of my frame. So i have to know witch website included my frame.
What function I have to use in javascript
Thanks
I have made a html page and two website take it on her website like a frame.
I want to change the color of my frame. So i have to know witch website included my frame.
What function I have to use in javascript
Thanks
I'd look into
window.frames
As that returns an array of frames within the current window.
This might also be of some help:
http://www.oreillynet.com/pub/a/javascript/excerpt/jstdg_ch13/index.html?page=2#winoverview
try {
alert(window.top.location);
} catch (e) {
alert("Couldn't read window.top.location.\n" + e.message);
}
This may not work due to cross-site policies. Alternately, you could have some server-side logic dynamically insert a stylesheet based on request parameters.
E.g.,
http://mysite.com/iframeContent?useStyles=http://yoursite.com/iframe.css