Click to return to the DHTML, HTML     
background-color Attribut...     Behaviors Library    
Web Workshop  |  DHTML, HTML & CSS

mpc Behavior


Adds a multipage control to the document.

Syntax

XML<Prefix:mpcType ID=sID STYLE="behavior:url('mpc.htc')" />
HTMLN/A
Scriptingobject.style.behavior = "url('mpc.htc')"
object.addBehavior ("mpc.htc")

Possible Values

Prefix Prefix used to associate CustomTag with a namespace. This prefix is set using the XMLNS attribute of the HTML tag.
mpcType Type of tag created by the mpc behavior.
containerString used by the mpc behavior to create a multipage container for individual tabs and pages.
pageString used by the mpc behavior to create a page and associated tab for the multipage container.
sID String that uniquely identifies the object.

Members

Styles

Remarks

The behavior-defined members listed in the preceding table are not accessible through script until the window.onload event fires. Waiting for this event to fire ensures that the page is completely loaded, that all behaviors have been applied to corresponding elements on the page, and, consequently, that all the behavior's properties, methods, and events are available for scripting. Attempting to use any of the behavior-defined members will result in a scripting error indicating that the object does not support that particular member.

The mpc behavior is used to add both the multipage container and individual tabs and pages. The type of control is determined by the user-defined mpcType.

Example

This sample demonstrates the implementation of the mpc behavior to add a multipage control to a Web page.

Sample Code

<HTML XMLNS:IE>
<HEAD>
<STYLE>
@media all{
   IE\:CONTAINER {behavior:url(mpc.htc);}
   IE\:PAGE {behavior:url(mpc.htc);}
}
</STYLE>
</HEAD>
<BODY onload="oMPC.style.visibility='visible'">
<IE:CONTAINER ID="oMPC" STYLE="width:400; height:250;">
   <IE:PAGE
      TABTITLE="This is a title, also"
      TABTEXT="Some Text">'
         This is some sample text...
   </IE:PAGE>
   <IE:PAGE
      TABTITLE="Title"
      TABTEXT="Image">
         <IMG SRC="flag.gif"
         WIDTH="171"
         HEIGHT="80">
   </IE:PAGE>
</IE:CONTAINER>
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

See Also

DHTML Behaviors, Using DHTML Behaviors



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.