View Full Version : encodeURIComponent

07-17-2007, 01:04 PM

I am using encodeURIComponent(document.title) to grab the title for something I need... I was wondering, since my page titles are long and annoying for SEO purposes, can I just get up to the first instance of ":" in the title?

Example page title:
Article Title : Category : Website

I just want to grab the "Article Title" part up to the first ":"!

Thanks for any help!

07-18-2007, 02:01 AM
var pageTitle = documen.title;
var arr = pageTitle.split(" : ");

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum