Documents that contain content information and script information that
controls user-interactivity with the document are encoded as a content section
that is separate from the script information. The script information contains references
to the content section, which typically comprises text information. By segregating
the text information from the script, all text applications are able to display
an undisturbed copy of the text information. In a preferred embodiment, the script
is appended to the text information segment of the document, so that the direct
display of the initial portion of the document is an immediately readable version
of the text. In a second encoding method, which can be independent or combined
with the first method, the script information is encoded using "invisible" sequences
of characters. In one example embodiment, unique sequences of invisible characters,
such as space, backspace, tab, etc., are used to encode each script element. In
another example embodiment, the script elements are encoded as a sequence of visible
characters and corresponding invisible characters that have the effect of erasing
the visible characters from view, such as backspace characters. By invisibly encoding
the script elements, the direct display of the document will appear as a text document,
because the script elements will either be self-erasing, or attached to the text
document as "invisible" white space.