Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Change and reset page title
07-15-2011, 02:35 PM #1
- Join Date
- Jul 2010
- Thanked 18 Times in 18 Posts
Change and reset page title
One my website its one index page, putting in content depending on the link (ie ?page=xxxxx) and from that it generats the page name, (Page name - MySite). I also have an AJAX search form working on keyup (kinda like google autosearch). I want it so when i start typing there it changes the title to Search - MySite. Then when its empty revert to what ever it was before. Could someone gimmie a hand doing this? I already have the AJAX coding for the search bar so i can post that if iy would help more.
Last edited by tomharto; 07-15-2011 at 02:39 PM.
07-15-2011, 02:44 PM #2
- Join Date
- Mar 2007
- Thanked 2,224 Times in 2,211 Posts
You may do something like
Code:var current=document.title; document.title = "new title"; .... document.title=current;
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
Users who have thanked abduraooft for this post: