Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I show the page title

Status
Not open for further replies.

MARELUAD

Programmer
Jan 13, 2003
37
NL
How can I show the page title (<title>....</title>)
with ASP like;

<% response.write ??????? %>

Regards
 
<% response.write &quot;<script> document.title </script>&quot; %>

quick generic answer

_____________________________________________________________________
onpnt2.gif

 
The result is:

View source:
<html>
<title> HALLO </title>

<body>
<script> document.title </script>
</body
</html>

The source is:

<html>
<head>
<title>First Title</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body>
<% response.write &quot;<script> document.title </script>&quot; %>
</body>
</html>

 
ok, well I suppose I should ahve been a bit more forth coming there

in order to actually show it you would need to do something with it

eg:
<% response.write &quot;<script> document.write document.title </script>&quot; %>

what basically happens here is you combine your client and server relations (but not really)

you can use conditional statements to either show the title or not. Thats the basic function of something like outputting client scripts with server scripts.

so to make your page up there a bit more functional you would do something tot he effect of
<html>
<head>
<title>First Title</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body>
<% response.write &quot;You have reached <script language=&quot;&quot;javascript&quot;&quot;> { document.write(document.title); } </script>&quot; %>
</body>
</html>

_____________________________________________________________________
onpnt2.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top