PDA

View Full Version : Ultimate Fade-in Slideshow V2



tranman
09-19-2009, 08:52 PM
1) Script Title: Ultimate Fade-in Slideshow V2

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

3) Describe problem: The script works great, thank you. But my site is dynamic: the header is the same for all pages, the contents changes depending on what you clicked. I put the <div id="fadeshow1"></div> in the home page, and the script works as planned, but as I click on links, I get an error message saying the DIV id "fadeshow1" not found on the new page (the header of this new page is the same as others, I just don't have div to show the slideshow here).

Can you help?

ddadmin
09-20-2009, 08:25 AM
For each of your page that uses the slideshow, try changing the reference to the .js file to it so it's absolute, ie:


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

<script type="text/javascript" src="http://mysite.com/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>

This ensures the path to the .js file is always correct regardless of the directory of the page referencing it.

tranman
09-20-2009, 04:12 PM
I am not sure if I explained my problem correctly. I put header this code (http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow_dev.htm) in HEAD section, on the page that I want to display the slideshow, it is fine. But on the page that I don't want to display the slideshow in the body, there is an error message saying "DIV id "fadeshow1" not found"...

Are we talking about the same thing?

ddadmin
09-21-2009, 06:57 AM
Ah if you're referring to the custom error message that pops up warning you that the DIV for the slideshow is not found, you can disable that by commenting out the following line inside the .js file:


if (setting.$wrapperdiv.length==0){ //if no wrapper DIV found
//alert("Error: DIV with ID \""+setting.wrapperid+"\" not found on page.")
return
}

tranman
09-21-2009, 06:24 PM
Wonderful, I think it should solve my issue. Thank you.

nbomberger
09-25-2009, 03:53 PM
I am having the same problem, and it just popped up today. Yesterday I added some links and did some other work, but not sure what I could have done to get this error.

The site works flawless on Safari Mobile, Safair, and FF. In I.E. it pops up saying 'Error: DIV with ID "fadeshow1" not found on page'.

If I comment out the .js file, won't it prevent the slideshow from showing up?

the site is http://nateandjackie.com if anyone has time to take a look at what I am doing...

update: Actually, in I.E. it seems to be killing the site completely - a bit frustrating.. I commented out the js file and nothing but the background is showing up.

DISCLAIMER: I am new to CSS and javascript - this is my first site and it needs to be up and running by the end of the week, so any help is appreciate. I was all smooth sailing until today when I checked it from my work computer..

ddadmin
09-26-2009, 04:49 AM
Hmm this is a bizarre one- you shouldn't even need to comment out the aforementioned line above for it to work in IE, though FYI, looking at your fadeslideshow.js (http://nateandjackie.com/java/fadeslideshow.js) file, I see the mentioned line in question isn't commented out anymore:


if (setting.$wrapperdiv.length==0){ //if no wrapper DIV found
//alert("Error: DIV with ID \""+setting.wrapperid+"\" not found on page.")
return
}

Just a guess, though it's possible there is a conflict between this script and the others on your page. What happens if you remove the below two lines from your page:


<script type="text/javascript" src="http://nateandjackie.com/java/niftycube.js"></script>
<script type="text/javascript" src="http://nateandjackie.com/java/niftyLayout.js"></script>

mmedina
09-26-2009, 04:53 AM
Is it possible to remove (or change to white) the black background that shows up immediately before the first image appears?

Hardbyte
09-26-2009, 02:45 PM
Hi there,

I've got it working in Firefox and IE7, but it does not seem to work in Opera, Safari or Chrome for me?

http://www.henleyandbarr.co.uk/index2.php

Any ideas?

Many thanks

soren
09-26-2009, 03:38 PM
I am using Safari and I don't see any problems with black on the site...

nbomberger
09-27-2009, 06:02 PM
Hmm this is a bizarre one- you shouldn't even need to comment out the aforementioned line above for it to work in IE, though FYI, looking at your fadeslideshow.js (http://nateandjackie.com/java/fadeslideshow.js) file, I see the mentioned line in question isn't commented out anymore:


if (setting.$wrapperdiv.length==0){ //if no wrapper DIV found
//alert("Error: DIV with ID \""+setting.wrapperid+"\" not found on page.")
return
}

Just a guess, though it's possible there is a conflict between this script and the others on your page. What happens if you remove the below two lines from your page:


<script type="text/javascript" src="http://nateandjackie.com/java/niftycube.js"></script>
<script type="text/javascript" src="http://nateandjackie.com/java/niftyLayout.js"></script>

I tried this. Still doesn't work. Frustrating... Any thoughts?

nbomberger
09-28-2009, 01:20 AM
UPDATE: I figured out what was going on. Using http://jigsaw.w3.org/css-validator/ and http://validator.w3.org/ to validate my html and my css, I discovered I had some tags that weren't properly embedded and some tags that weren't properly closed. After going over my site fixing these issues, it appears to work fine.

Thank you for your help. I hope this will help someone else down the road. I now will validate html and css all the time to at least limit the scope of the errors or problems.