Is it possible to reference a Web page title
(Document.Title) in an asp page? For example,
<% Document.Title%> embedded in the body of an asp page?

This would allow a server side include that changes a
header at the top of the page, based on the page Title.

Thanks, Jim

Re: reference the document object? by Aaron

Aaron
Tue Jun 22 23:11:16 CDT 2004

No, you can base it on the URL, but ASP doesn't have access to the
client-side HTML. Unless, of course, you opened the ASP file with
FileSystemObject and parsed for <title></title>. But blecch.

--
http://www.aspfaq.com/
(Reverse address to reply.)





<anonymous@discussions.microsoft.com> wrote in message
news:201ed01c458d7$1cd9df70$a401280a@phx.gbl...
> Is it possible to reference a Web page title
> (Document.Title) in an asp page? For example,
> <% Document.Title%> embedded in the body of an asp page?
>
> This would allow a server side include that changes a
> header at the top of the page, based on the page Title.
>
> Thanks, Jim



Re: reference the document object? by Evertjan

Evertjan
Wed Jun 23 03:25:17 CDT 2004

wrote on 23 jun 2004 in microsoft.public.inetserver.asp.general:

> Is it possible to reference a Web page title
> (Document.Title) in an asp page? For example,
> <% Document.Title%> embedded in the body of an asp page?

There are no asp-pages, a page is a clientside thing.

There are serverside .asp files,
that render clientside html [or other] files,
defaultly keeping the extention name .asp

> This would allow a server side include that changes a
> header at the top of the page, based on the page Title.

try:

<!-- #include file ="setmyServersideTitleValue.asp"-->
<title><%=myServersideTitleValue%></title>

or even:

<!-- #include file ="setmyServersideTitleValue.asp"-->
<script type="text/javascript">
document.title = '<%=myServersideTitleValue%>'
// mind the lowercase
</script>


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)