|
|
Subject:
Need to copy page title and push into heading tag in a .html page (includes ok)
Category: Computers > Programming Asked by: dreamzdb-ga List Price: $25.00 |
Posted:
23 Oct 2006 14:01 PDT
Expires: 04 Nov 2006 12:34 PST Question ID: 776146 |
|
There is no answer at this time. |
|
Subject:
Re: Need to copy page title and push into heading tag in a .html page (includes ok)
From: pmmbala1976-ga on 24 Oct 2006 15:05 PDT |
Hi I am not sure this is what u need. got it from one of the forum. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title> </title> <script type="text/javascript"> function changeTitle(foo){ var idToUse = foo; // The key to it all document.title = document.getElementById(idToUse).innerHTML; } </script> </head> <body onload='changeTitle("newTitle")'> <h1 id="newTitle">This Is The Title2222</h1> </body> </html> Thanks Bala |
Subject:
Re: Need to copy page title and push into heading tag in a .html page (includes
From: dreamzdb-ga on 29 Oct 2006 11:43 PST |
Bala- Sorry I didn't get back to you sooner, I thought they would email me when I had a response :). The code that you included does exactly what my current code does only in reverse. The code snippet that you gave writes the title based on the content of the h1. Unfortunately that doesn't work for me because it's javascript and it won't be spidered as I mentioned in my request. Thanks for looking. Let me know if you find anything else out. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |