PDA

View Full Version : Ultimate Fade-In Slideshow not working in Safari



gd4
04-15-2011, 10:29 AM
1) Script Title: Ultimate Fade-In Slideshow not working in Safari

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

3) Describe problem: The Slide show (main banner) works fine in IE and firefox but it doesnt work in safari. Just shows a white space where the banner should be. Here is a link to the page (http://www.ampmgraphics.com).

Can anyone help?

Thanks in advance :)

jscheuer1
04-16-2011, 12:58 AM
Update to the current version - 2.4:

http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

Or, if that's too much for you, there was an interim version that fixed that problem:

http://www.dynamicdrive.com/forums/showpost.php?p=90026&postcount=1

It's otherwise identical in usage and setup to the version that page in your post uses.

gd4
04-18-2011, 01:21 PM
Hi, thanks for your reply.

I replaced the text within my js file and the banner is showing in safari now but in all browsers it's just showing one banner and isn't rotating them...what have I done wrong??

Thanks

jscheuer1
04-18-2011, 02:35 PM
Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.

Sorry, gotta do that. All that means is that here:


<script type="text/javascript" src="includes/templates/red_passion/jscript/jscript_YOURJAVASCRIPT.js"></script>

it should be:


<script type="text/javascript" src="includes/templates/red_passion/jscript/jscript_YOURJAVASCRIPT.js">
/***********************************************
* Ultimate Fade-In Slideshow (v1.51a): (c) Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
</script>

That said, there are some problems with the external sctipt's code. Remove:


<script type="text/javascript">

from the beginning and:


</script>

from the end. These don't belong in an external script.

One other thing, it needs a fadebgcolor declared. That's the color behind the images in the show. It's usually never seen, except sometimes just as the show is loading. Put that here (highlighted):


/***********************************************
* Ultimate Fade-In Slideshow (v1.51a): (c) Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["includes/templates/red_passion/images/header_bg.jpg","http://www.ampmgraphics.com/", "_self"]
fadeimages[1]=["includes/templates/red_passion/images/header_bg2.jpg", "http://www.ampmgraphics.com/index.php?main_page=index&cPath=98", "_self"]
fadeimages[2]=["includes/templates/red_passion/images/header_bg3.jpg", "http://www.ampmgraphics.com/index.php?main_page=index&cPath=104", "_self"]
fadeimages[3]=["includes/templates/red_passion/images/header_bg4.jpg", "http://www.ampmgraphics.com/index.php?main_page=index&cPath=114", "_self"]

var fadebgcolor="white"

////NO need to edit beyond here/////////////

var fadearray=new Array() //arr . . .

I think white would be good for your page, but it can be any valid css color value.



Added Later:

Just get things working first, but I see that the division where the slideshow is has a background image of one of the banners. It's this we're seeing when the script isn't working. Once the script is working, it might look better to get rid of that style (from the includes/templates/red_passion/css/stylesheet.css file around line 1028):


#imagemap {

height:238px;
width: 842px;
background-image: url(../images/header_bg2.jpg);
background-repeat:no-repeat;
margin-top:0px;
}


But what about viewers without javascript? For that you could put a noscript tag on the page and show the actual image in that for non-javascript viewers (from the index.php file around line 61 - addition highlighted):


<div id="imagemap">
<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 842, 238, 0, 9000, 1, "R")
//new fadeshow(fadeimages2, 140, 225, 0, 3000, 0)

</script>
<noscript>
<img src="includes/templates/red_passion/images/header_bg2.jpg" width="842" height="238" alt="original image" title="" />
</noscript>

gd4
04-19-2011, 09:15 AM
Thanks for that John...all seems to be working now.

I had the credit code within the external page. So I have left it in there but taken off


<script type="text/javascript" src="includes/templates/red_passion/jscript/jscript_YOURJAVASCRIPT.js">

and
</script>

in which file should I add in the full code?


<script type="text/javascript" src="includes/templates/red_passion/jscript/jscript_YOURJAVASCRIPT.js">
/***********************************************
* Ultimate Fade-In Slideshow (v1.51a): (c) Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
</script>

Thanks! :)

jscheuer1
04-19-2011, 03:08 PM
The live page looks good in the browser! And that's both with and without javascript.

Let me try to be as precise about this other matter as possible, not add but replace:


. . . here:


<script type="text/javascript" src="includes/templates/red_passion/jscript/jscript_YOURJAVASCRIPT.js"></script>

it should be:


<script type="text/javascript" src="includes/templates/red_passion/jscript/jscript_YOURJAVASCRIPT.js">
/***********************************************
* Ultimate Fade-In Slideshow (v1.51a): (c) Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
</script>

That said . . .

And that would be in the index.php file or the index page's file or the external include/require, for that page, wherever that code is and whatever the file it's in is called. What has to happen is that it appear in the 'view source' of the browser when viewing the source code of the page at (www) .ampmgraphics.com/ - and the same for any other page(s) that use the script, if any.

That's in the rules (Dynamic Drive's terms of use (http://www.dynamicdrive.com/notice.htm)). See especially #4 on that page. I didn't make the rules up, but it's required of me as a moderator to advise folks of them. If it were one of my scripts from DD, I have a few, I would like the credit shown in that manner.

gd4
04-20-2011, 09:58 AM
Thanks again John. I still can't find where that script is...I'll post on the Zen forum and see if they can help as to where I need to add this code. I've done a search in the database and it doesn't come up. It's not in the index file either..very strange as it is in the source of the page.

Thanks for your help...I'll reply once I find out!

:)

jscheuer1
04-20-2011, 06:31 PM
Do you have an index.php file in the root of that domain?

gd4
04-21-2011, 09:37 AM
Yes I do...but this bit of script isn't in there..

<script type="text/javascript" src="includes/templates/red_passion/jscript/jscript_YOURJAVASCRIPT.js"></script>

the credit text is within the script file (when clicked on within the source) but still not showing in the main source..

hmm

jscheuer1
04-21-2011, 04:52 PM
That bit of code is not script. It's an HTML external script tag and it appears in the served source code of index.php, in its head. So it's either there in the index.php file, or in some file that gets included in index.php, like a head template for instance.

Look at the actual source code on your hard drive of the index.php. See if that line is there in its head. If not, see if there are any PHP include or require directives brining in other content from other file(s). If so, check those for that line.