PDA

View Full Version : Fade-in Slideshow - IE 7 error Expected ':'



kmorgen
03-05-2010, 10:42 PM
1) Script Title: Ultimate Fade-In Slideshow (v2.0)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem: the slideshow works fine on my web page (http://www2.energysteward.com/default.aspx), but IE7 displays the error icon in the lower left corner on page load. When clicked it says:

Error: Expected ':'

It goes away if you Refresh the page.

I'd really appreciate any insight into this problem.

Thanks.

jscheuer1
03-06-2010, 06:31 AM
That error is with your other jQuery script (jquery-1.4.1.js), not the one (jquery.min.js) used for the slide show, and there's another script error as well:


Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Sat, 6 Mar 2010 06:07:47 UTC


Message: Expected ':'
Line: 48
Char: 262
Code: 0
URI: http://www2.energysteward.com/js/jquery-1.4.1.js


Message: Invalid argument.
Line: 7
Char: 9366
Code: 0
URI: http://www2.energysteward.com/js/cufon-yui.js



Fortunately, you only need one version of jQuery for the page, and the other error is a result of a conflict between cufon-yui.js and jQuery which can be avoided. Also, there is a new version of jQuery (1.4.2) that will work with the slide show that doesn't have the error that 1.41 has.

The only potential problem is, if you are actually using jQuery 1.4.1 for something else on the page and if that something else cannot run in noConflict mode (the default for the slide show, and required if you actually need the cufon-yui.js script).

Hope you're still with me. If so, change this in your page's source code:


<script src="js/jquery-1.4.1.js" type="text/javascript"></script>
<script src="js/cufon-yui.js" type="text/javascript"></script>
<script src="js/cufon-replace.js" type="text/javascript"></script>
<script src="js/Futura_700.font.js" type="text/javascript"></script>

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


<style type="text/css">
.style2 {
text-align: right;
}
.style3 {
width: 100%;
overflow: hidden;
text-align: right;
}
.style4 {
color: #818181;
}
.style6 {
color: #818181;
font-size: x-small;
}
</style>
<script type="text/javascript" src="jquery.min.js"></script>

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

/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

to:


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="fadeslideshow.js">

/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>
<script src="js/cufon-yui.js" type="text/javascript"></script>
<script src="js/cufon-replace.js" type="text/javascript"></script>
<script src="js/Futura_700.font.js" type="text/javascript"></script>

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


<style type="text/css">
.style2 {
text-align: right;
}
.style3 {
width: 100%;
overflow: hidden;
text-align: right;
}
.style4 {
color: #818181;
}
.style6 {
color: #818181;
font-size: x-small;
}
</style>

As I say, that might cause a problem for some other jQuery dependent script on the page (if any). If it does, that other script will have to be put into noConflict mode. However, I doubt that's an issue because I would probably be detecting an error as regards that, and I'm not. If you are using a common header via server side includes or some other CMS type thing, there might be a problem as regards this on other pages. If so, the jQuery dependent script(s) on that other page(s) will need to be put into noConflict mode.

If you want to host your own copy of the jQuery 1.4.2 script, you may download it from the link in the src attribute:

http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js

(right click, 'save as')

kmorgen
03-06-2010, 03:29 PM
That did it! Thank you so much.

I spent almost all day yesterday trying to figure out why I was getting that error. And I didn't think it was one of the other scripts because it's a template and all of that code was already there.

Thank you again for your help.

kmorgen