Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

JS to Display page Title on Page??

  • 23-01-2003 5:05pm
    #1
    Closed Accounts Posts: 2,695 ✭✭✭


    A bit like the way a standard bread crumbs script will display the page title on the page itself...

    Is there any bit of JS that can be placed in html that will display the title of the page (alone)??
    ie. Whatever is in the <Title>PAGE TITLE</Title> tags

    Any help/suggestions appreciated
    TY

    David.


Comments

  • Closed Accounts Posts: 1,362 ✭✭✭the Guru


    If you Use Dreamweaver you can get an ext from there site I have it @ home I will give you the details Later


  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    <script language="Javascript>
    <!--
    var titles = document.getElementsByTagName("title");
    document.write(titles[0].text);
    //-->
    </script>
    


  • Closed Accounts Posts: 2,695 ✭✭✭b20uvkft6m5xwg


    I'm using DW alright. I've had a look on the exchange now but cant find exactly what I'm looking for.

    if you have a .mxp that will do it, it'd be much appreciated.
    Thx


    --
    Any other suggestions welcomed too :)


  • Closed Accounts Posts: 2,695 ✭✭✭b20uvkft6m5xwg


    Originally posted by Enygma
    <script language="Javascript>
    <!--
    var titles = document.getElementsByTagName("title");
    document.write(titles[0].text);
    //-->
    </script>
    

    Hmm...
    I tried pasting that into the <body> but it doesnt work.

    I presume thats the way it would work!?


  • Registered Users, Registered Users 2 Posts: 3,889 ✭✭✭cgarvey


    the code is missing a quote .. it should be "Javascript" and not "Javascript"

    putting in the quote at the end and it works in IE anyway

    .cg


  • Advertisement
  • Closed Accounts Posts: 2,695 ✭✭✭b20uvkft6m5xwg


    Sorted

    cgarvey aka Eagle Eye :)

    Thx


  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    Well spotted!

    I was ..... just testing you.....yes....testing

    :D


  • Registered Users, Registered Users 2 Posts: 3,889 ✭✭✭cgarvey


    Ah lads, if ye were sharp enough ye would have spotted the a similar typo in my own post .. the second Javascript should have no closing quote to make my point valid ;)

    "Knuckle down now lads, farily liiiiively"
    .cg


  • Closed Accounts Posts: 2,695 ✭✭✭b20uvkft6m5xwg


    TBH CG,
    I did notice, but I didnt want to be pedantic :p

    --
    Anyhoo...

    Works fine alright in IE but no luck in Opera or NN 4.7
    I'm not too bothered about NN but would like it to work for opera v6 at least.

    Anyone got any other ideas??


  • Closed Accounts Posts: 14,483 ✭✭✭✭daveirl


    This post has been deleted.


  • Advertisement
Advertisement