Setting the title of the page to the site title

Not sure why by MOSS does not like to change the title of the page you are on.  I would think the title would be the logical choice, which is exactly what my customer asked for.  Lucky for me MOSS does output the title in a nice, easy to get to location within the page.    Just add a Content Editor Web part (which has saved me quite a few times!), mark it as hidden and add the following through the “Source Editor…” button


<script language=”javascript”>


document.title = document.getElementById(‘ctl00_PlaceHolderSiteName_onetidProjectPropertyTitle’).InnerText;


</script>


 


You may need to do some searching to make sure the element is the same for you.