Welcome to WebmasterWorld Guest from 54.242.224.250

Forum Moderators: open

Message Too Old, No Replies

Extract and Display Page Titles

Automatically display page title in body

     
8:35 pm on Nov 11, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Sept 6, 2008
posts: 50
votes: 0


I want to create a kind of directory list of all the photo galleries on my site with their ID number and title. I know how to extract the ID number form the URL, but am unsure of how to extract the page titles of each gallery automatically. Can someone please help me?
9:26 pm on Nov 11, 2009 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 17, 2005
posts:4988
votes: 12


This should really be done server side (using PHP, ASP, etc.) as a JavaScript solution will be inaccessible to people (and search engines) with JavaScript disabled. However, you can get the title (as defined in the <title> element in your <head>) via:

document.title

9:32 pm on Nov 11, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Sept 6, 2008
posts:50
votes: 0


This script is solely for my own use.

How would I use document.title to find the title of another page?

10:02 pm on Nov 11, 2009 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 17, 2005
posts:4988
votes: 12


I misunderstood your request.
I don't think there is a good client side solution.
10:05 pm on Nov 11, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Sept 6, 2008
posts:50
votes: 0


Alright. I post this in the PHP forum then. I was trying to create a page I could run off my local machine without having to use a server, but I'll make it work. Thanks for the help.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members