What's New at XtGem Know XtGem's updates - even the small ones - in a way explained loong. Psst, this is not the official Xtgem Blog
What's NewAboutXtToolsForumContactGallery

Show Page Title on _header and _footer

You might think to actually output a page title, on an included file on such page. In order to overcome this problem, a simple JavaScript snippet will do!

The requirements are

Once you understand the requirements, now head to any file of your choice. That file should be meant to be included on a regular page. For example, the _header and _footer file. But don't worry! You can always output the page title anywhere if you are looking forward not to put it in the footer and header file!

Modify this raw Javascript as per to your choice:

<script type="text/javascript"> 
    var title = document.getElementsByTagName("title")[0].innerHTML;

Or for a clearer preview

        <script type="text/javascript">
        var title = document.getElementsByTagName("title")[0].innerHTML;

Yes that should do the trick!

The above script should output:
Leave a respond on this tips on the forums!
Content last updated on:3rd May 2014 1:53pm GMT

BackBack to top
Rate this siteGuestbook
Online 1 • 1 views today • 1383 views
Terms of Service | Privacy

Links you might want to visit

XtGem Official BlogXtGem's Knowledge BaseXtGem Official ForumXtBoardTrainerPlus - an in-depth site to understand XtGemTutor Lewat HP (Indonesia)Extras!
U 1 | D 1 | W 3 | M 9 | T 1383

whatsnewat.xtgem.com is handled by GreenWap for XtGem