简体   繁体   English

FF和IE中的SWFObject错误,在Chrome中正常运行

[英]SWFObject Error in FF & IE, works fine in Chrome

I've noticed that I have a strange issue on my website when using Autoviewer (a flash gallery). 我注意到使用Autoviewer(Flash Gallery)时,我的网站上存在一个奇怪的问题。 I never noticed the issue before and I swear it was working fine up until a few months ago, but my gallery will load fine in Chrome, but display the incorrect dimensions in IE and FF. 我之前从未注意到此问题,并且发誓直到几个月前它仍能正常工作,但我的画廊在Chrome中可以正常加载,但在IE和FF中显示的尺寸不正确。

Here's the error I receive in IE: 这是我在IE中收到的错误:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Mon, 19 Sep 2011 07:30:23 UTC


Message: 'SWFObject' is undefined
Line: 114
Char: 3
Code: 0
URI: http://mikegreenephotography.com/sports/sports.html


Message: 'SWFObject' is undefined
Line: 125
Char: 3
Code: 0
URI: http://mikegreenephotography.com/sports/sports.html

In FF I get: 在FF中,我得到:

SWFObject is undefined
var fo = new SWFObject("autoviewer.swf", "autoviewer", "100%", "75%", "8", "#181818");      

In Chrome the site works fine. 在Chrome中,该网站可以正常运行。 I don't get it. 我不明白 I appreciate any help. 感谢您的帮助。

If you look at the http responses for your site, you're getting a 404 for the swfobject.js file: 如果查看您站点的http响应,则swfobject.js文件将得到404:

Request URL:http://mikegreenephotography.com/swfobject.js
Request Method:GET
Status Code:404 Not Found

You need to put the swfobject.js file in that location, or update your HTML to reflect the correct location. 您需要将swfobject.js文件放在该位置,或更新HTML以反映正确的位置。

Change this line: 更改此行:

<script type="text/javascript" src="../swfobject.js"></script>

To this: 对此:

<script type="text/javascript" src="/sports/swfobject.js"></script>

And it will work just fine. 它会很好地工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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