How to force IE8 into compatibility mode WITHOUT clicking the button - internet-explorer-8

I was recently asked to assist my city with their website. What i found when i went there, was they had been using Web Expressions. When they previewed the page within the program, it looked fine, when you open it in any other browser though, the layout it all over riding each other and everything is all jumbled.
They don't want to re start anything so the only thing that i am trying to do is force the IE 8 to render it as IE 7.
I've been researching for awhile now and i know about the
line of code and i've tried this, it works even, however, they don't like the idea of having their users have to use a button. Is there a way to have the IE8 go straight into compatibility mode without having the users click the compatibility button?
I also know about the documentMode, can that be set to = 7 in javascript? Would that change anything?

If you've not already done so, try putting this in the header of your HTML:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
More information: http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx

Related

WYSIWYG buttons don't show in IE for CKEditor

I have a fresh installation of Liferay on Tomcat and in IE7 it doesn't show the buttons for visual editing in the editor when I try to edit content.
It works on in Firefox or Chrome.
Does anyone have an idea why would that happen? I am not sure where to dig, I don't see javascript exceptions and it doesn't look like the buttons are even populated in IE. It is hard to debug IE problems since I don't have a tool like Firebug there.
I downloaded the 6.1 and still have the same problem, adding the URLs of what I see. Looks like IE only has the text box and in the DOM I don't see the same things that I see in FF.
http://i44.tinypic.com/35jf5td.jpg
http://i43.tinypic.com/11qqvt0.jpg
Update on this:
I checked with some people in our organization and they have the buttons on their browser.
I checked the version of the IE browser and it's the same down to the last digit. Properties are the same as well. The only difference is that I have some plugins installed that the other browser doesn't. I tried disabling all the plugins but it didn't help.
The suspect plugin is Google Chrome Frame (ChromeFrame BHO). Can someone please try to add this plugin and see if it messes things up? The disabling it doesn't help.
Liferay CE 6.0 contains few bugs within the WYSIWYG editor integration.
One issue with IE is LPS-16004 (solution included). This might be the same problem as you are experiencing.
I remember we had also problem with javascript race condition in editor initialization, which sometimes loads the editor incorrectly.
But I strongly suggest you to move to Liferay CE 6.1 as it is much more stable.
Ok, I finally figured it out, so if someone has the same problem, here is the reason - we have Google Chrome Frame plugin installed in our organization, but it only works on white-listed domain names. In this case the domain the site was on wasn't whitelisted, but the portal looked at the agent string and saw chromeframe there and assumed it can use it as chrome browser, which broke things.
Right now I will try to white-list the domain and see if it works. Another solution would be to try and find a place where we look for the agent string and fix it there, not sure where this place is.

back button function for phonegap windows phone 7

How do I get the back button from Windows phone to work with PhoneGap 1.2?
Now what the back button does is exit the app.
There is a good post I dont understand or get to work by one of the SO editors: http://www.scottlogic.co.uk/blog/colin/2011/11/handling-the-back-stack-in-windows-phone-7-phonegap-applications/
but I dont understand it and I cant get it to work. (even the sample .sln has an error for me)
My app is a very simple structure of index.html and many html does that come off that one page, so if all the back button did was goto index.html, that would probably work for me.
Is there a solution for idiots? For example - add this framework but only to specific pages. Put this code here, and that code there, and those pages dont need anything. Something like that?
I have recently published a more simple example for back-button handling in applications that contains simple HTML pages:
http://www.scottlogic.co.uk/blog/colin/2011/12/a-simple-multi-page-windows-phone-7-phonegap-example/
In essence, there is some C# code that keeps track of when the browser navigates from one page to another, handling the back-button event in an appropriate fashion. Just drop your code into the www directory and it should work fine.

chrome scrolling issues after some ajax operations

I am experiencing strange issue with scrolling, After doing some ajax operations on a webpage, which dynamically add & remove contents from the page. Mouse scrolling hangs up (mouse scoll events doesn't work) and pressing UP ARROW key from keyboard solves the problem.
I wonder is there any known issue like that for chrome?
Edit:
I don't have any js errors on the page, I am simply adding contents to div block dynamically
<div id="ContentArea">
<!-- load contents here -->
</div
<script>
loadHtml('/my/target/page', 'ContentArea');
// this contents may vary in size
</script>
Edit:
Similar thing happened to me on StackOverflow when i clicked load (n) new answers while answering some question. (some days ago)
I had similar issues and got them fixed by scrolling to the top/left corner before replacing the content. Just add the following line before you replace anything:
window.scrollTo(0, 0);
I've tested it only with Chromium 9.0.594.0 (67311) on Mac, but I think chances are good that this will work with on other platforms as well.
I've had strange problems with Chrome and scrolling, then I uninstalled the SmoothScroll extension and everything worked.
Try disabling all of your extensions and see if the problem persists (note: disabling does not uninstall them but will help you identify if an extension is causing the problem):
Menu button -> Tools -> Extensions
Then click the Disable link on all of them (and you may want to restart Chrome for good measure)

IE8 Developer Tools not displaying Style info

I'm running into an issue with IE8 developer tools where they Style information is not displaying in the pane when I select an element. It is definitely page specific as I can switch to another page and the styles will appear for that page when I select an element.
Strangely, if I add an inline style to an element, the inline element will display in the style pane. The page finds the CSS files just fine since the page is rendering with the styles.
Anyone else encounter such a problem? If it helps, the page I'm developing is a Joomla template. I'm currently doing the process-of-elimination by deleting half the code, then the other half to identify the culprit code but I'd thought I'd throw this out to see if anyone else knows. Thanks everyone.
I saw others mention similar problems in other forums and the common issue has to do with a link tag to an external stylesheet. In my case, it was a Google Fonts Directory link.
<link href='http://fonts.googleapis.com/css?family=Josefin+Sans+Std+Light' rel='stylesheet' type='text/css' />
Removing the link temporarily allowed to style information to display.
I had a similar issue when a stylesheet had an include statement for another stylesheet that did not exist.
Try refreshing the Developer Tools' DOM cache - 4th button in the toolbar, the hotkey's F5. If the element's styles change after the Dev Tools window is opened, the actual DOM and the reported one can differ.
I ran into the same issue and found that developer tools was freaking out on my Typekit JS in the head. There was nothing wrong with it. Developer tools was just being finicky. Imagine that. I commented it out and viola, it worked again.
Another buddy of mine said he had seen developer tools freak out when an HTML tag wasn't closed properly so that might be another thing to look for.

Why doesn't Visual Studio always render my page correctly when debugging locally in fire fox 2.0x?

When I debug locally in fire fox 2.0x many times my page won't have the styles added properly or the page will not completely render (the end is seemingly cut off). Sometimes it takes multiple refreshes or shift-refreshes to fix this. Is this a common issue or is it just me? Any solutions?
I want to add that this is happening in fire fox 3.x to me as well. I add my javascript to the pages dynamically and this might be part of the issue. This is when I am working locally with Visual Studio.
Update: This does happen in IE but it happens much more often in Fire Fox. The issue seems to be only javascript and CSS files not loading. For example I get jQuery is not defined, $ is not defined etc. I don't think I have local IIS to test this on but from the server it always works perfectly. Fire Bug shows all my css and javascript files to be requested and received.
This could be a problem with IPv6 and DNS of the Firefox browser. This issue is known to slow down Firefox on localhost:SOMEPORT. The effect would be that some external files won't load (css, js etc.) resulting in a partially rendered page.
You can solve this issue by simply deactivating IPv6 in Firefox:
Insert about:config in the Firefox address bar
Set network.dns.disableIPv6 to true or alternatively add localhost to network.dns.ipv4OnlyDomains
A different way to fix this issue, is to a remove the ipv6 address from your hosts file this way: open the file
C:\Windows\System32\drivers\etc\hosts
(with administrator privileges) and remove (or comment out #):
:: localhost
Make sure that you narrow the scope of the problem. Does the problem just happen when debugging from VS or does it also happen with local IIS? With server-based IIS? Does it happen to other developers in your company? Is it really just FireFox or does it happen to Chrome, Opera, IE, etc?
Assuming that you've already worked that all out, I would suggest installing a FireFox plug-in called "Tamper Data". Open that and refresh the page. You'll see a record of every connection from the browser to the server (for each html file, image, css file, etc). Look to see if any of the them are very slow or not completing (perhaps one of those files is taking a long time and FF is waiting for it to finish before loading other important files).
Assuming that all of the files correctly loads, you should consider checking that the syntax is valid (maybe there is some unclosed tag or quotation mark that is causing FF confusion). I use a plugin called "Web Developer", but there are a lot of other options out there.
You could also use a plugin called FireBug to view the HTML behind various parts of the page to see if there are any noticeable problems. You start FireBug, go to the HTML tab, click Inpsect, and move your mouse over something on the page, and it will show you the HTML behind it.
One thing to do would be to check the source of the page(s) in question. My guess would be that the local server that VS runs is not giving you the entire source of the page. One way to verify this would be to run exactly the same code in the debug environment, as well as from a "real" server like IIS 6. If the same behavior is seen on loading the page from both servers, as well as insuring that the full page source is being recieved by the browser(s), then it is a bug in Firefox and should be reported. This is especially true if other browsers, ie. IE, Chrome, Safari, Opera, render the page fully.
Are you comparing what you see in Firefox to what is displayed in the Visual Studio designer? If this is the case, then they are using 2 different methods to render the html and may not display the same.
Anything further on this folks?
I have examined the traffic using Firebug and it appears that when veiwing the response from the request for a style sheet, the response is just blank. After refreshing (sometimes multiple times) the age displays correctly and the response information contains the style sheet. I have not seen this in any other browser and it only occurs when viewing the app from Visual Studio.
2! Recently i had the same problem. Im using MVC 1.0 and I added a new stylesheet into Views/Share folder. And when i run the project, the page didnt render along with the css. If your web project is a MVC one so try put the css file into the Content folder.
Hope this help.
HaiVu.Doan.
In case anyone else finds this with newer versions of Visual Studio, I have to run VS as Administrator. This is something I keep forgetting to do, but once I right clicked on Run as Administrator when opening VS, the problem went away.
Initial problem, I could not get CSS to render when running a project from VS 2012 using Firefox as the browser. (IE worked just fine, btw.) The content would be there, but no CSS. This was the first post I found when I typed in my question.

Resources