简体   繁体   中英

Colorbox iFrame content not appearing in IE 8/9

I'm using ColorBox to call a few informational modals on-screen and given the client's requirements, the best way to do this is via iFrames (not my first choice but whatever). Everything is working peachy in Chrome, FF, etc. but the iFrame content is not working in any version of IE. The modal wrapper appears but nothing is inside. This is what I've done so far:

  1. Changed the doctype to transitional and strict for IE. No dice.
  2. Removed the "iframe: true" and replaced it with HTML "Hello". That worked fine and "Hello" appeared in the Colorbox modal.
  3. I've removed all stylesheets from the header. No luck so it's not a CSS issue.
  4. Just to be sure, I rolled back my JQuery library to 1.6.2 from 1.8.2. Nothing there, either.

Any help would be appreciated. This is aggravating.

Some code:

 $(function ()
{
    $(".modal-large").colorbox({iframe:true, innerWidth:580, innerHeight:500});
})

HTML:

<div class="top-droptext"><a class="modal-large" href="modal/serviceproviderinfo.html">Update Password</a></div>

It's doctype issue. You need to add this to beginning of your colorbox caller page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM