Skip to main content
Inspiring
March 23, 2008
Answered

Page Title Hijacked

  • March 23, 2008
  • 2 replies
  • 451 views
I have created a navigation bar using fireworks and exported as in GIF format to dreamweaver where I use it in an application.cfc. My problem is that now every page I access has the name of the navigation bar (navbar.gif) as the title.

Why is the application.cfc hijacking the page title? How do I fix this?

Find attached the code that in referenced within application.cfc that is causing the problem.
    This topic has been closed for replies.
    Correct answer Amiable_Penguin15D5
    Application.cfc runs at the top of every page request. The HTML code you placed in it runs before any HTML code in whichever files you're tying to display. By placing this HTML in Application.cfc, you're overriding any changes to the HEAD or TITLE in your CFM pages.

    <html>
    <head>
    <title>NavBar.gif</title>
    <meta http-equiv="Content-Type" content="text/html;">

    What you should probably do is break down your HTML into smaller files so that you can change the contents of the TITLE tag for each page if that's what you want.

    2 replies

    Amiable_Penguin15D5Correct answer
    Participating Frequently
    March 24, 2008
    Application.cfc runs at the top of every page request. The HTML code you placed in it runs before any HTML code in whichever files you're tying to display. By placing this HTML in Application.cfc, you're overriding any changes to the HEAD or TITLE in your CFM pages.

    <html>
    <head>
    <title>NavBar.gif</title>
    <meta http-equiv="Content-Type" content="text/html;">

    What you should probably do is break down your HTML into smaller files so that you can change the contents of the TITLE tag for each page if that's what you want.

    Participating Frequently
    March 24, 2008
    What is your "hijacked" page title? "NavBar.gif"?

    Can you also send the Application.cfc file content?