Applying background to Iframe [IE / Firefox /Safari / Opera

August 2, 2007 at 3:00 am 3 comments

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”&gt;
<html xmlns=””&gt;


function change_background() {
var iframeDoc;
if (window.frames && window.frames.subscribe && (iframeDoc = window.frames.subscribe.document)) {
// now use iframeDoc here’red’;

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<title>Untitled Document</title>

<body onLoad=”change_background();”>
<iframe src=”test1.html” id=”subscribe” name=”subscribe” scrolling=”no” frameborder=”0″></iframe>



Entry filed under: Javascript.

Arrays / Populating arrays / Sorting in Javascript Scroll / Scroller in css

3 Comments Add your own

  • 1. Daniel Tome  |  July 30, 2008 at 3:07 am


    This will only work on iframes that are under the same domain.


  • 2. I T  |  October 8, 2010 at 8:41 pm


  • 3. ebook reader review  |  November 15, 2011 at 8:12 am

    Excellent submit, very informative. I’m wondering why the other specialists of this sector do not realize this. You must proceed your writing. I’m confident, you’ve a huge readers’ base already!|What’s Going down i’m new to this, I stumbled upon this I have discovered It absolutely useful and it has aided me out loads. I hope to contribute & assist different customers like its aided me. Great job.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Flickr Photos

Blog Stats

  • 720,244 hits

%d bloggers like this: