Welcome to WebmasterWorld Guest from 23.22.46.195

Forum Moderators: open

Extract and Display Page Titles

Automatically display page title in body

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

5+ Year Member



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)

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



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)

5+ Year Member



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)

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



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

5+ Year Member



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.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month