Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 16th, 2006, 11:31 AM   #1
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,799
Rep Power: 5 Sane will become famous soon enough
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
Sane is offline   Reply With Quote
Old Jul 16th, 2006, 11:38 AM   #2
Agent 47
Hobbyist Programmer
 
Agent 47's Avatar
 
Join Date: Nov 2005
Posts: 122
Rep Power: 3 Agent 47 is on a distinguished road
document.title should work fine. As in:
function changeTitle(s)
{
	document.title=s;
}

...
changeTitle('some new title');
__________________
"I'm going to become rich and famous when I invent a device that allows you to stab people in the face over the internet"
Agent 47 is offline   Reply With Quote
Old Jul 16th, 2006, 11:44 AM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,799
Rep Power: 5 Sane will become famous soon enough
Worked beautifully. Thanks.

I'll assume it's compatible across all standard browsers enabling javascript? Woo!
Sane is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Console colour dynamically Xenon C 5 Nov 13th, 2005 9:47 AM
Id3 tags of mp3 files, can't get it to work please help mleonid C++ 14 Aug 21st, 2005 9:22 PM
Making Tables With <div> Tags You Like Java? HTML / XHTML / CSS 8 Mar 22nd, 2005 12:41 PM
changing domains/ranges guest1234 C++ 2 Feb 15th, 2005 12:38 AM
image tags Monkey_features Community Announcements and Feedback 13 Feb 14th, 2005 8:56 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:44 PM.

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