Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   JavaScript and Client-Side Browser Scripting (http://www.programmingforums.org/forum23.html)
-   -   Changing The <title> Tags (http://www.programmingforums.org/showthread.php?t=10740)

Sane Jul 16th, 2006 11:31 AM

Changing The <title> Tags
 
Is there a way to dynamically change the <title> tags in javascript?

I've tried looking on google, and one mailing list said it wasn't possible. I couldn't find anything else helpful either. Am I able to grab it with getelementbyID and change the attribute innerHTML or something?

It's also a necessity, since the title will need to be changing without the page reloading. It sounds like the only way.

Thanks for any help. :o

Agent 47 Jul 16th, 2006 11:38 AM

document.title should work fine. As in:
:

function changeTitle(s)
{
        document.title=s;
}

...
changeTitle('some new title');


Sane Jul 16th, 2006 11:44 AM

Worked beautifully. Thanks.

I'll assume it's compatible across all standard browsers enabling javascript? :) Woo!


All times are GMT -5. The time now is 10:28 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC