...

View Full Version : Code only works in IE compatibility mode?



Alb
06-19-2012, 07:46 PM
Hi guys,

I’ve spent a few days trying to narrow down a problem I’m having on my website.

I have a Flash application on the page – which calls a javascript function.

This javascript function then updates the document.title every second.

The code works great in firefox/chrome – but as always IE9 (maybe 8 and 7) has a problem.

When you move the mouse – anywhere on page – the swf will stop moving.

What I have now discovered is that if you turn on Internet Explorers compatibility mode it works.

Could anyone advise me on what to check in my javascript / css / html – to see what compatibility mode is changing to make it work.

I have tried changing the doctype to html5 – changed the content type to utf-8.

I cannot work out what the problem could be :(

All I can think is, that compatability mode must be changing some part of my code to make it work correctly. I would really like to find out what it is doing – and permantly apply this change to my site for all my users.


Thanks for any help! :)

Alb
06-19-2012, 11:02 PM
Just to update,

I've added this to my htaccess file...



BrowserMatch MSIE best-standards-support
Header set X-UA-Compatible IE=8 env=best-standards-support


and that has fixed the problem!

BUT...

This isnt how i'd really like to fix the problem - with a hack :(

I'd like to track down what was is causing the problem in the javascript code -and actually fix it.

If anyone can still help me find out what to check in my code why it may not be working in IE -- that would be really great thanks :)

felgall
06-20-2012, 12:04 AM
My crystal ball is broken so I am unable to see the JavaScript you are using so as to work out what is wrong with it.

Alb
06-20-2012, 09:46 AM
So there is nothing i can look for that compatability mode is known to change?

I just thought someone may have had a similar problem before.

abduraooft
06-20-2012, 11:33 AM
I'd like to track down what was is causing the problem in the javascript code -and actually fix it.
Could you post your code here?

felgall
06-21-2012, 12:38 AM
So there is nothing i can look for that compatability mode is known to change?

There are at least several thousand possibilities that might be in your code causing the problem but without seeing the code there is no way to narrow it down.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum