PDA

View Full Version : Code vanishing



MSP
07-14-2010, 02:22 PM
1) Script Title: Ultimate Fade-in slideshow (v2.4)

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

3) Describe problem:
Hi,
I have recently installed the above script and it seems to work very well most of the time but sometimes when the site loads the following line of code just vanishes which produces an error:


<div id="fadeshow1"></div>

I have not changed anything prior to this happening and if I enter the code again it works fine for a while but then vanishes again.

I am using Open Realty and this is the full code I have on my main page for the fadeinslideshow:


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><script type="text/javascript" src="http://www.mspvillaservices.com/images/banner/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 type="text/javascript">

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [600, 133], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://www.mspvillaservices.com/images/banner/spanish_sun_holidays_msp_01.jpg", "http://www.spanishsunholidays.com", "_new"],
["http://www.mspvillaservices.com/images/banner/spanish_sun_holidays_msp_02.jpg", "http://www.spanishsunholidays.com", "_new"],
["http://www.mspvillaservices.com/images/banner/spanish_sun_holidays_msp_03.jpg", "http://www.spanishsunholidays.com", "_new"],
["http://www.mspvillaservices.com/images/banner/spanish_sun_holidays_msp_04.jpg", "http://www.spanishsunholidays.com", "_new"] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})




</script></p>
<div id="fadeshow1"></div>

Could this be a little bug or something that I would need to talk to the Open Realty creators about.

Cheers

azoomer
07-14-2010, 03:47 PM
I don't see this important part of the script in your code
<script type="text/javascript" src="fadeslideshow.js">

Where in your document do you have the code you posted ? in the head ? or in the body?
We need to see the whole page. do you have a link?

MSP
07-14-2010, 04:56 PM
Hi azoomer

Thanks for replying on this.

My site is

www.mspvillaservices.com

Trying to run this script on the main page on the picture at bottom of page

Site is still not officially live so may be a few more pop up errors - just taken off maintenance mode temporarily

Cheers

jscheuer1
07-14-2010, 07:15 PM
If it's physically missing from the source code, you should get an alert from the script to that effect. Also, when using the browser's 'view source', you should not be able to locate that division.

If that is indeed the case, it has nothing to do with the script. Perhaps when editing the page or something associated with the page you somehow leave it out and then have to put it back. Or there could be a bug in Open Realty. We can't tell which from here.

But if you are not getting the alert, and you can see the division in the browser's 'view source' when this problem occurs, then there is some other problem.

azoomer
07-14-2010, 07:52 PM
MSP ! now a couple of hours later i see that you have got it working. You have two links to jquery-1.4.2.min.js on the page so you can delete one of them. you also have jquery-1.2.3.pack.js and i dont know if thats really needed. There is a javascript error regarding the fancy box script and i guess i comes down to the jQuery.noConflict()
in the fadeslideshow.js.
The error does seem to disappear from the firefox error console when i change to this

jQuery(document).ready(function($){
$(".fancybox").fancybox();
$("#gallery a").fancybox();
});
But i can't really test it in internet explorer right now.

MSP
07-14-2010, 08:58 PM
Cheers for the advice guys. What i have done is remove the fancybox script as it is not going to be used on this site now anyway and that has removed the error, but will be on another one so will have a play around with what you guys said.