A problem displaying [localhost] caused Internet Explorer to refresh the webpage using compatibility

Source: Internet
Author: User

Problem:

Last week, using the jquery UI, dialog implemented the function of querying after the popup dialog, throwing the following error:

"A problem displaying [localhost] caused Internet Explorer to refresh the webpage using compatibility View."

I used the ie8,ff,chrome test, only IE8 throw the problem.



IE automatically switches to compatibility View mode. When the dialog box pops up, it cannot be manipulated and the page will always refresh automatically.


Resolution process:

The Code in the dialog box is written in <div id= "Groupsetting_dialog" class= "Dialogcontent" >...</div>

First the div inside the code comment, run, see if there is no problem, if there is no problem, and then slowly reduce the div comment code, and then run. After so many times, it is found that a small div in the div has a problem.

But this small div does not have HTML, only CSS, so delete the CSS, run no problem, and then add a little bit of CSS to try, until the addition of "" MAX-HEIGHT:200PX; , an error is thrown.

Check a bit, said is IE8 temporarily not support max-height/min-height.

So, just use JS to add the Height property to the small Div.


Workaround:

IE8 does not support a CSS, so use JS to add other alternative properties to the Div.

$ ("#ViewList"). attr ("style", "height:200px; Overflow:scroll; ");




A problem displaying [localhost] caused Internet Explorer to refresh the webpage using compatibility

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.