Jquery 仅在IE中视频结束后关闭FancyBox iframe时出错
我在Magento 1.6.2上。使用FancyBox 1.3.4 在IE8中,我单击FancyBox显示的关闭按钮,我收到下一个错误: 我不允许插入图像,我必须列出错误:Jquery 仅在IE中视频结束后关闭FancyBox iframe时出错,jquery,magento,iframe,fancybox,Jquery,Magento,Iframe,Fancybox,我在Magento 1.6.2上。使用FancyBox 1.3.4 在IE8中,我单击FancyBox显示的关闭按钮,我收到下一个错误: 我不允许插入图像,我必须列出错误: 此页上的脚本中出现错误 行:1 字符:1 错误:访问被拒绝 代码:0 网址: 是否要继续在此页上运行脚本 是/否 在Chrome、Firefox、Opera、Safari中,我的站点不显示任何错误,视频可以随时打开和关闭。 请给我一些解决这个问题的线索 FancyBox嵌入代码: jQuery("a[rel=ifram
- 此页上的脚本中出现错误
- 行:1
- 字符:1
- 错误:访问被拒绝
- 代码:0
- 网址:
- 是否要继续在此页上运行脚本
- 是/否
jQuery("a[rel=iframe_flv_digitus]").fancybox({
'type': 'iframe',
'width': 746,
'height': 430,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'overlayColor': '#000000',
'overlayOpacity': '0.4',
'padding' : 0,
'wmode': 'transparent',
'scrolling': 'no',
centerOnScroll: true
});
调用视频:
<p><a rel="iframe_flv_digitus" href="/jwplayer/player.swf?allowscriptaccess=always&skin=/jwplayer/skin/slim.zip&width=726&height=410&file=/jwplayer/ServerRack.flv"&controlbar=over&autostart=true"><img src="/media/wysiwyg/biometrics/label_view_short_video-en_100.png" alt="digitus" /></a></p>
可以看到问题的我的页面:
请向下滚动并单击:
- 观看短片
if(productId) {
new Ajax.Updater(destElement, imgUrl, {
method: 'get',
/* Cristian - inlocuiesc linia de mai jos cu cea de sub ea pentru ca in SCP dupa alegerea unei optiuni sa pot descide specificatiile in lightbox */
/*evalScripts: false,*/
evalScripts: true,
/* end Cristian*/
/*onComplete: function() {
//Product.Zoom needs the *image* (not just the html source from the ajax)
//to have loaded before it works, hence image object and onload handler
if ($('image')){
var imgObj = new Image();
/*imgObj.onload = function() {product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint'); };
imgObj.src = $('image').src; ----- Cristian - am renuntat la aceasta instructiune pentru a putea utiliza lightbox in SCP dupa selectarea unei optiuni
} else {
destElement.innerHTML = defaultZoomer;
/*product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint')----- Cristian - am renuntat la aceasta instructiune pentru a putea utiliza lightbox in SCP dupa selectarea unei optiuni
}
}
}*/);
} else {
destElement.innerHTML = defaultZoomer;
/*product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');----- Cristian - am renuntat la aceasta instructiune pentru a putea utiliza lightbox in SCP dupa selectarea unei optiuni*/
}
})
将此条件块更改为:
if(productId) {
new Ajax.Updater(destElement, imgUrl, {
method: 'get',
/* Cristian - inlocuiesc linia de mai jos cu cea de sub ea pentru ca in SCP dupa alegerea unei optiuni sa pot descide specificatiile in lightbox */
/*evalScripts: false,*/
evalScripts: true
/* end Cristian*/
/*onComplete: function() {
//Product.Zoom needs the *image* (not just the html source from the ajax)
//to have loaded before it works, hence image object and onload handler
if ($('image')){
var imgObj = new Image();
/*imgObj.onload = function() {product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint'); };
imgObj.src = $('image').src; ----- Cristian - am renuntat la aceasta instructiune pentru a putea utiliza lightbox in SCP dupa selectarea unei optiuni
} else {
destElement.innerHTML = defaultZoomer;
/*product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint')----- Cristian - am renuntat la aceasta instructiune pentru a putea utiliza lightbox in SCP dupa selectarea unei optiuni
}
}*/
});
} else {
destElement.innerHTML = defaultZoomer;
}
这个
新的Ajax.Updater(a,b,{…})
没有正确关闭。。。您注释掉了结尾的}
括号。。。这就触发了一个js错误,谢谢chridam。不幸的是,在进行修正后,一切都没有改变。我在IE中收到了相同的错误。我可以看到您已注释掉了整个块,无法进一步调试新错误访问被拒绝。player.swf,第1行character 1
您是否可以恢复更改以反映上述修复,以便我可以在不注释整个块的情况下实际跟踪错误?是的,我将返回到上述情况。我也在寻找另一个补丁,关于SCP和JQuerry Fancybox。在对可配置产品进行选择之后,Fancybox不再有效。现在代码已经和上面一样了,我将在这里等待,直到我看到你的答案。谢谢