IE's window. showmodaldialog has insufficient memory.

Source: Internet
Author: User

When window. showmodaldialog is used today, it is found that IE reports "insufficient storage space when the modal window is opened, and this operation cannot be completed. "Error.

The tracking found that it was actually a problem with jquery, but it was strange that there was no problem at all in the general window. So Google spent half a day and could not find a solution.

After more than half an hour, I finally found the problem. It turns out that IE cannot access "Navigator. useragent" in the modal window, but jquery uses it.

I cannot give up jquery for such a small task.

Later I checked it and accessed it once. Let me change it to jquery.

In fact, it is very easy to judge whether the current window is a modal window:

FindNavigator. useragent. tolowercase ()

Changed:

(Parseint (self. dialogwidth)> = 0 )? "": Navigator. useragent. tolowercase ())

Generally, a window does not have the dialogwidth attribute. Therefore, it is used to determine whether a window is modal.

This is OK.

After hitting !!

 

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.