Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
function setTitle(name){
// Will change the title of the page
// Name Type Use
// @ Param name String New page title
document.title = document.title.replace(/\s-\s.+?(?!\s-\s)$/i," - "+name);
}


Really short, and a little advanced RegExp. :P


Xylish

Xylish Avatar

******
Ghost Admin

1,895


June 2005
So this code will replace the title name on the browser? :o
Ex-admin, designer and founder of Studio Zero. Currently working as a Dentist :)

Singular

Singular Avatar
v4 Studios :: Coming Soon

***
Dedicated Member

238


September 2005
Yes it will.
Further Solutions :: Hosting :: Scripts :: Templates
furthersolutions.com

v4 Studios - Coming soon

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Yeah, that's what it does Joe :P

crazynarutard

crazynarutard Avatar

*****
Senior Studio Member

1,470


August 2005
function title(ntitle)
{
   document.title = document.title.split(/-/)[0] + '- '+ntitle;
}


:o

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Now lets assume some forum makes their title fancy.

" - Cool Designs - Home"

Do you see a problem? :P Cause I do.

newBookmarkLockedFalling