Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: iframe issue


Message #1 by CORNELIO GALLARDO <corgall@y...> on Mon, 8 Oct 2001 02:21:31 -0700 (PDT)
Hi Cornelio,

this is from MSDN:

IFRAME Element | IFRAME Object

------------------------------------------------------------------------
----
----

Creates inline floating frames.

Remarks

The IFRAME element functions as a document within a document, or like a
floating FRAME. The frames collection provides access to the contents of an
IFRAME. Use the frames collection to read or write to elements contained in
an IFRAME. For example, the syntax for accessing the backgroundColor style
of the body object in an IFRAME is:

sColor 
document.frames("sFrameName").document.body.style.backgroundColor;

You can access the IFRAME object's properties, but not its contents, through
the object model of the page where the IFRAME object resides. For example,
the syntax for accessing the border style of the IFRAME object is:

sBorderValue = document.all.oFrame.style.border;

The IFRAME element is a block element and requires a closing tag.

This element is available in HTML and script as of Microsoft Internet
Explorer 4.0.

Using IFRAME Elements

------------------------------------------------------------------------
----
----

With Microsoft Internet Explorer 5.5, frames are now windowless, resulting
in greatly improved performance. In addition, Internet Explorer 5.5 can now
overlap IFRAME elements, also known as inline floating frames, and can make
the content inside inline floating frames transparent.

Inline floating frames in Internet Explorer 5.5 provide the following
features.

Increased performance over previous versions of Microsoft Internet
Explorer. Internet Explorer 5.5 has been optimized to handle inline floating
frames more efficiently. This means faster rendering, less memory, and
faster scrolling.
Inline floating frames can be stacked over other inline floating frames.
Inline floating frames can contain transparent content.
The following topics are discussed in this document.

Creating Inline Floating Frames
Using Transparency with Inline Floating Frames
Stacking Inline Floating Frames
Related Topics
Creating Inline Floating Frames
To create a inline floating frame, use the IFRAME tag.

<IFRAME NAME="Frame1" SRC="frame.htm" >
</IFRAME>

The IFRAME tag creates a floating frame at its location in the HTML file.
Internet Explorer renders the frame inline. The SRC attribute specifies the
content to be displayed within the frame.

You can also place content into the previous IFRAME tag by using a frame
destination, as follows:

<A HREF="http://www.microsoft.com" TARGET="Frame1">See Microsoft's Web
Site</A>

The previous example creates a hyperlink that navigates to Microsoft's Web
site inside the inline floating frame. It uses the TARGET attribute to load
the Web page into the IFRAME. The NAME attribute on the IFRAME tag indicates
the TARGET for the A tag.

Using Transparency with Inline Floating Frames
Although Internet Explorer has supported transparent elements since
Microsoft Internet Explorer 4.0, only Internet Explorer 5.5 supports
transparent content with inline floating frames.

The following attributes define transparent content.

The background-color attribute or the BGCOLOR attribute (used with the
content).
The ALLOWTRANSPARENCY attribute (used with the IFRAME element).
Note  The BGCOLOR attribute can be applied to the BODY element, but it is
deprecated as of HTML 4.0. It is recommended that you use the
background-color attribute instead.
The IFRAME element must use the ALLOWTRANSPARENCY attribute, and it must be
set to true.

The following example shows how to apply the background-color attribute to
the content file.

<HTML>
<BODY  STYLE="background-color:transparent">
<P>Transparent.
</BODY>
</HTML>

The following example shows how the IFRAME element is written for
transparent content.

<IFRAME NAME="Frame1" SRC="frame.htm" ALLOWTRANSPARENCY="true">
</IFRAME>

Stacking Inline Floating Frames
Internet Explorer 4.0 and later supports the z-index attribute. However,
only Internet Explorer 5.5 and later support the z-index attribute with
inline floating frames. By specifying the z-order of floating frames, you
can stack one frame on top of another.

To specify the position of the inline floating frame, use the z-index
attribute.

<IFRAME SRC="frame.htm" STYLE="z-index:1" >
</IFRAME>

Items are stacked from a smaller z-index value to a larger z-index 
value,
and the value can be negative.


-----Original Message-----
From: CORNELIO GALLARDO [mailto:corgall@y...]
Sent: 09 October 2001 01:33
To: JavaScript HowTo
Subject: [javascript_howto] RE: iframe issue



 are you sure that an iframe can only specify such things within the
document itself. i use the iframe to create a simple editor what i want

is to put a background on my editor. i know iframe need a source file
and the background of iframe is base on the bady background of a
document?
there is another way of puting a background in a iframe without using a 

document file background?
  "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> wrote:
an Iframe is a frame which contains another document. You can only
specify such things within the document itself.





-----Original Message-----
From: CORNELIO GALLARDO [mailto:corgall@y...]
Sent: 08 October 2001 10:22
To: JavaScript HowTo
Subject: [javascript_howto] iframe issue


Hello Guys,
My problem is i can't put a background tag in iframe any one know's? i
tried to use this tag... < iframe id="frame1" style="background-
color:red"> but nothing happend on my backgound.

Thanks a lot for your help.

  Return to Index