Post Reply 
Page contents to <title> tag
Oct. 29, 2010, 04:17 AM
Post: #6
RE: Page contents to <title> tag
I'd try to generate a javascript that alters document.title after identifying the portion of the target DIV to use for it. I'd generate that script either just before the /DIV or after it, and totally ignore what-ever any previous <title> might have been (if any).

Below illustrates the method. In this example the script is appending (via '+=' construct) the string to the previous title content. Maybe you want to assign your desired text instead of append.
Code:
<html>
<head>
<title>the base title</title>
</head>
<body>
Some Stuff in the body ...

<script language="javascript">
document.title += ' ** And We Added This';
</script>

</body></html>
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
Page contents to <title> tag - sh8an - Oct. 28, 2010, 03:34 PM
RE: Page contents to <title> tag - ProxRocks - Oct. 28, 2010, 03:56 PM
RE: Page contents to <title> tag - sh8an - Oct. 28, 2010, 04:47 PM
RE: Page contents to <title> tag - ProxRocks - Oct. 28, 2010, 07:35 PM
RE: Page contents to <title> tag - JJoe - Oct. 29, 2010, 01:21 AM
RE: Page contents to <title> tag - Graycode - Oct. 29, 2010 04:17 AM
RE: Page contents to <title> tag - sh8an - Oct. 29, 2010, 06:06 AM
RE: Page contents to <title> tag - sbk - Oct. 30, 2010, 01:40 PM

Forum Jump: