t:SWITCH Element | switch Object
This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.
Enables you to provide several choices and display content depending on which choice is true on the user's computer.
The following table lists the members exposed by the switch object.
Attribute Property Description systemBitrate
Gets the approximate bandwidth available to the system in bits-per-second.
Indicates whether to display a text equivalent of the audio portion of the presentation.
Indicates whether a given language is selected in a user's system preferences.
Specifies whether overdubs or subtitles render during a presentation.
Sets or gets the type of timeline associated with an element.
This example detects the system language setting from the Regional Options in Control Panel and displays a text fragment in Spanish, Portuguese, or English, depending on the system language setting.
<t:switch> <span class="time" systemLanguage="es" >Somos interdependientes (Espanol)</span> <span class="time" systemLanguage="pt" >Nos somos interdependentes (Portuguese)</span> <span class="time" systemLanguage="en" >We are interdependent (English)</span> <span class="time">None of the above</span> </t:switch>
Although different media-based elements exist, there is no functional difference in their current implementation. However, you are encouraged to use elements such as t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:REF, and t:VIDEO for improved document readability and enhanced support.
t:is used to associate this element with an XML namespace. You must declare the XML namespace in the html tag of your document when using this element.
<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<?IMPORT namespace="t" implementation="#default#time2">
- The switch element is not effective as a time container for multiple elements because it stops rendering children after the first child resolves true. For this reason, the timeContainer attribute is ignored by the switch element.
- HTML comment tags always resolve true. To incorporate HTML comment tags in switch blocks, you must wrap them in another container, such as a DIV or t:PAR. The following code fragment demonstrates how to do this.
<t:switch> <div systemLanguage="en" > <!--This is the english language part --> ... </div> <t:par> <!-- This is the catch-all part --> </t:par> </t:switch>
This element is not rendered.
This element requires a closing tag.