简体   繁体   中英

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). 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.

Here's the error I receive in 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:

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

In Chrome the site works fine. 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:

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.

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.

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