Inside the Templates

Each HTML template page consists of a series of elements, most of which can be modified for a custom design. For examples of these elements, see the contents of the BrowseMedia.htm file. The template pages implement some complex scripting; however, because most of the script is in separate JScript files, the HTML files are fairly simple.

In addition to the basic HTML required for the page layout, each HTML file includes most of the following elements:

  • A link to the style sheet file, Main.css.
  • A link to two or more of the JScript files.
  • The body element, which calls a set of functions when the page is loaded, and calls the onRemoteEvent event handler when the user presses a key. The latter allows the keyboard to function like the remote control.
  • A bgsound element to allow Windows Media Center to play sounds when buttons receive the focus or the user selects them.
  • A set of span elements for the item counter and paging arrows that accompany a scrolling menu.
  • A span element that functions as a placeholder for the shared view port.
  • A span element to contain a scrolling menu.
  • Several focusable elements, each of which is denoted by the custom property MCFocusable, which is set to "true", and a link to a special CSS style. The style contains a behavior link that controls the highlight state for the element.
  • A function called doSelect that provides the functionality for buttons and other focusable elements when they are selected or clicked.
  • The following topics describe the HTML templates in greater detail.
  • Custom Attributes and Properties
  • Using Spinners
  • Scrolling
  • HTML Behaviors
  • Checklist for New Pages

See Also

Show: