Hi Scott,
Thanks for the reply and the suggestion, but redirecting is not
what I'm trying to do; but now that I've been working on the
problem and am closer to a solution, I can describe the issue more
clearly. First, I'll give you The Scenario (sorry if it's prolix)
and then The Problem.
THE SCENARIO
We have a lot of documents that were converted to html. They're
stored on our server, in the file system, and have names like
"doc123.htm". They are barebones HTML, like this:
<HTML><HEAD></HEAD><BODY>content ... </BODY></HTML>
In our SQL Database, we have the documents coded by topics, and
also the full path to where they can be found. They're in
different directories, e.g.:
\webapps
\international
\travel
\medicine
\visas
When users visit our site, they search for a topic. Our menu.aspx
issues a call to the database and retrieves the ids and titles of
the matching documents, e.g.:
doc123 | Travel in Asia
doc456 | Innoculations Required for Travel in Asia
buiding hyperlinks to these items. The user clicks on the link to
retrieve the document. We have another page, launcher.aspx, which
is "called" by menu.aspx like this:
[pseudocode]
<script>
window.open(launcher.aspx?id=doc123, ....)
</script>
Launcher.aspx in turn does this:
-- gets the query string
-- determines the id of the document to display (doc123)
-- calls the database to find out where doc123 can be found in
the file system and then builds the URL
-- registers a startup script:
mystartupscript() {
window.location = {the full url for doc123.htm}
}
Thus, Launcher.aspx displays doc123.htm.
THE PROBLEM
These HTML documents are bare-bones text, without banners or
footers, so I'd like to display the contents of doc123.htm
*inside* a DIV if possible, rather than setting window.location =
{the full URL for doc123}
[Launcher.aspx]
..
..
..
<BODY onload='mystartupscript'>
<DIV id='banner'>
</DIV>
<DIV id='content'>
<!-- here's where doc123.htm's contents
i.e. what is inside its <BODY></BODY> tags
should be displayed -->
</DIV>
<DIV id='footer'>
</DIV>
</BODY>
Is this possible? Do I have to read doc123.htm as a stream, strip
off its <HTML><BODY> and corresponding closing tags, and inject
the HTML byte-stream into the DIV whose ID = 'content' ? Or is
there an easier way? I'd like to avoid FRAMES if possible.
Thanks!
TR