Skip to main content
Participant
October 19, 2007
Answered

HTML to CFML

  • October 19, 2007
  • 8 replies
  • 676 views
When I change the webpage filename from filename.html to filename.cfm the webpage loses its format/styling. WTF!

Anyone have a solution or know why this is happening?

This topic has been closed for replies.
Correct answer Volantorman
AND THE $65M (in Monoply Money) answer goes to Ian Skinner......

Even if you put a blank Application.CFM, Coldfusion won't have to go digging for one elsewhere. Soon after I created the blank Application.cfm file, everything fell back into place.

So I tip my hat to you Ian - Thanks for taking my FreezingFusion and warming it up a bit.

As to the rest of you - I also thank you for your input and links to other tools etc.


So DYAAAAHHH whenever you use Coldfusion make sure there is an Application.cfm in the root of your project.

8 replies

VolantormanAuthorCorrect answer
Participant
October 25, 2007
AND THE $65M (in Monoply Money) answer goes to Ian Skinner......

Even if you put a blank Application.CFM, Coldfusion won't have to go digging for one elsewhere. Soon after I created the blank Application.cfm file, everything fell back into place.

So I tip my hat to you Ian - Thanks for taking my FreezingFusion and warming it up a bit.

As to the rest of you - I also thank you for your input and links to other tools etc.


So DYAAAAHHH whenever you use Coldfusion make sure there is an Application.cfm in the root of your project.
Inspiring
October 22, 2007
Ian Skinner wrote:
> Any chance you have an errant Application.cfc throwing extranious
> whitespace and|or other content at the top of the page. This can cause
> some browsers to void their 'compliance' and throw the browser into
> 'quirks' mode which can have dramatic effects on how CSS works on the
> page layout.
>

That should be Application.cfm. Application.cfc would be of less concern.
Inspiring
October 22, 2007
Any chance you have an errant Application.cfc throwing extranious
whitespace and|or other content at the top of the page. This can cause
some browsers to void their 'compliance' and throw the browser into
'quirks' mode which can have dramatic effects on how CSS works on the
page layout.

Inspiring
October 22, 2007
What's the difference between the rendered HTML from the .html and .cfm
files?

--
Adam
October 22, 2007
Display your CFM page and do a View Source. Upload this page to the Web and go to http://www.netmechanic.com/products/HTML_Toolbox_FreeSample.shtml. Enter the URL of the page into the form provided, supply your e-mail address and click "Test Now". The result will show you, in agonizing detail, what's wrong with your HTML. This should point you to a solution to the problem.

An alternative is http://validator.w3.org/, where you can get similar results. Or if you want to download a HTML checker, try http://sourceforge.net/projects/htmlchecker.

If all that fails, save your "good" HTML and your "bad" CF-generated HTML as two separate files and use something like Beyond Compare ( http://www.scootersoftware.com/) to find the differences.
Participant
October 22, 2007
Thanks for those links, I'll be sure to post a note of what the heck caused the problem. For the other question my .css is in another file on the app server. As I said all files work great in HTML but not after renaming same files to .cfm

If we were allowed to use tables I would solve it in a jiffy but I have to use CSS in order to conform the corporate "Look and Feel" aaaarrrrrrrrgggggggghhhhhhhhhhh.
Inspiring
October 22, 2007
Volantorman wrote:
> Nope sorry I cannot - Corporate restrictions prevent me. I just can tell you if
> I have a centered nice looking 3 column page in html, as soon as I rename it to
> a cfm filetype and load it into the browser (FireFox or IE 6 or 7) the page
> sticks to the left side of the window and the columns become out of alignment
> and some colours change too.
>
> I thought nothing would happen but it does and it's a mess.
>

is your css defined in the same page or in a separate .css file?

--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Participant
October 19, 2007
Nope sorry I cannot - Corporate restrictions prevent me. I just can tell you if I have a centered nice looking 3 column page in html, as soon as I rename it to a cfm filetype and load it into the browser (FireFox or IE 6 or 7) the page sticks to the left side of the window and the columns become out of alignment and some colours change too.

I thought nothing would happen but it does and it's a mess.
October 19, 2007
Sounds odd to me, I use CSS with CF pages all the time and I can't remember it causing the formatting to blow up just by changing the extension (not that I don't believe you). Could you post the code? At least maybe the CSS and top of the page so we could see what could cause this.
October 19, 2007
Could you provide a link to an example on the Web?