INFO: Purpose and Format of Folder.htt
ID: Q181689
|
The information in this article applies to:
-
Microsoft Internet Explorer (Programming) versions 4.0, 4.01
SUMMARY
Folder.htt is a HyperText Template file containing HTML code that
individually or globally customizes the display of folder contents when
Internet Explorer 4.0x (IE) is installed. The default Folder.htt file
contains script to access and display information from the FileList
control, examples of how to handle folder window resizing, and how to use
the Thumbnail Viewer control.
MORE INFORMATION
The default Folder.htt file is stored with the Hidden attribute under the
Web subdirectory of the Windows directory (that is, C:\Winnt\Web or
C:\Windows\Web). In an open folder, when you right-click to bring up the
shortcut menu and "Customize this Folder..." is selected, a dialog box
appears. In this dialog box, "Create or edit an HTML document" may be
selected.
If this is the first time you have customized this folder, clicking the
Next button causes the customization wizard to copy Folder.htt from the
location listed above to the current folder. If this is not the first time
you have customized this folder, the customization wizard will use the
existing Folder.htt in the current folder. The wizard then allows you to
edit this file. Another file, Desktop.ini, is also created in the directory
and is used by the shell to locate Folder.htt.
By default the folder customization wizard invokes notepad to edit
Folder.htt, but the .htt extension may be associated with any suitable HTML
editor. Microsoft FrontPage is a popular choice.
The general layout of the HTML in the default Folder.htt file is as
follows:
Style settings:
Defined for use throughout the file.
FixSize function:
JavaScript handles panel resizing. If the window that is used to view this
folder is too small, this routine hides the banner and attributes panels.
FormatNumber function:
JavaScript that returns the comma-delimited form of a number.
Init function:
JavaScript dispatch routine used to initialize the display.
SelectionChanged event:
JavaScript that is called when the selection changes in the FileList
control. The script retrieves file attributes, calculates various values,
positions items, and creates an output string that displays the information
using the innerHTML property.
OnThumbnailReady event:
JavaScript called when a thumbnail has been generated for the selected
item.
Normal Banner DIV:
Banner displayed when the folder view window is large enough.
Mini-banner DIV:
Banner displayed when the folder view window is too small.
Left Info Panel DIV:
Panel that displays the folder and the selected item attributes, including
the thumbnail view. Also includes a commented out section where custom
HREF's may be added easily.
FileList object tag:
Instantiation of the FileList control used primarily in the
SelectionChanged event script above.
The FileList control is a ShellFolderView object and is documented in the
Internet Client SDK online help:
http://www.microsoft.com/msdn/sdk/inetsdk/help/itt/Shell/Objects/ShellFolderView/ShellFolderView.htm
Please note that the ShellFolderView object is only valid inside a
Folder.htt file. The ShellFolderView object cannot be used anywhere else
(for example, in a Visual Basic program or a Web page), because the object
is self-initializing and there is no way to get it to navigate to a folder.
While the folder view provided by the default Folder.htt is perhaps the
most intuitive, it is not the only display available. The contents of
Folder.htt are fully customizable and can provide any of the functionality
that a normal Web page provides.
REFERENCES
http://www.microsoft.com/msdn/sdk/inetsdk/help/itt/Shell/Objects/Objects.htm
Additional query words:
Folder.htt Desktop.ini FileList Folder
Keywords : kbIE400 kbIE401 InetSDKShellObjMod
Version : WINDOWS:4.0,4.01
Platform : WINDOWS
Issue type : kbinfo