IE formatting issue when placing code at top of page

Somebody please help!

I am building an authorization system. A part of the system is adding pages that are to be protected. The way it will work is that a superuser will be able to browse parts of the site and click on a drop-down box at the top of any page and assign a role to that page to make it protected. I am testing the format of how the secure bar is going to work. You can see an example here:

http://www.realradioactive.org/administration/

As you can see, the bar sits at the top of the page with the drop-down box. It works fine in Firefox, Camino, and Safari, but as soon as I check it in IE on the PC it changes the formatting of the rest of the page. I know this is because I have viewable code where there isn't supposed to be any. The code is being called from the onRequestStart method in my Application.cfc file. This is why it must show up first on the page. Is there anyway to fix it so that IE does not change the formatting of the rest of the page? Also, I would rather not input an output variable on all the pages within the body text just to get this to fix. I am attempting to do this all through the onRequestStart function.

Thanks
-Kyle
LVL 2
remmuhAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

remmuhAuthor Commented:
I did a quick cheap fix. I added all the header info that goes at the top of the page to fool ie into thinking the body had started. Sure this goes against all W3C standards, but you do what you gotta do sometimes. any other ideas would be great thanks.
0
PluckaCommented:
remmuh,

FYI, it works fine in IE7 when I tested it. So Ie6 was probably breaking some standards.

Regards
Plucka
0
remmuhAuthor Commented:
indeed. thanks for the input.
0
JeffHowdenCommented:
No, it's not breaking standards.  By putting content before the doctype, you're triggering quirks mode.  This is known behavior.  In order to generate valid code, you need to figure out how to get these bits and bobbles within the body of the document.  I'd recommend an include with your conditional code for whether to display the extra bits and bobbles or not.
0
GranModCommented:
PAQed with points refunded (250)

GranMod
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.