Why wouldn't you use something like this:
$("title").val(); Chris Scottus wrote:
I am using var title = document.getElementsByTagName('title').item(0).innerHTML; to get the content of a pages title tag. But if the page has no title tag I get "Error: document.getElementsByTagName("title").item(0) has no properties" and the script craps out. any ideas about how to deal with this ?
-- http://cjordan.us