![]() |
Is it possible to inject a background color into someone else's iframe?
I need to turn a iframe with a white bg into a black bg.
Is there anyway to do this? <IFRAME SRC="http://www.xxxxxx.com/table/xxxxxx/xxxxxx.html?affiliate_id=XXXXXX" width=950 height=1710 frameborder="no" scrolling="no"></IFRAME> |
Simplest way I know is just ask the owner of the Iframe to make a second version of their page/image, with a black background, and issue you a new iframe for it.
:D |
You can attach a stylesheet via javascript on the parent page.
Code:
var cssLink = document.createElement("link") |
|
None of that worked. I think when it calls their page it overwrites what I make.
No worries, thank for trying to help. I will contact them to try to get a different one. |
If you use any programming language, you can do that easily.
Example, with PHP: - Fetch the iframe page, for example with cURL - Replace the background color white part with black - Output You can also use some jQuery/javascript to do the replacing as soon as the iframe loads, though this may cause a flicker if your user is on a slow connection. |
That sounds like a pain in the ass...
|
Quote:
|
Not sure if it's possible at all...
|
Quote:
|
| All times are GMT -7. The time now is 06:07 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123