PDA

View Full Version : Blending Image Slideshow Script [no loop but open new page and no error]



tuBBit
09-29-2006, 08:02 AM
1) Script Title: Blending Image Slideshow Script

2) Script URL (on DD): [URL="http://www.dynamicdrive.com/dynamicindex14/image4.htm"]

3) Describe problem: hi, i'd like some help solving 2 problems.

prob 1: stop the slideshow after displaying all the images in the array and then goes to another page automatically.

prob 1 example: i have 3 images and am at index.html. index.html plays the slideshow and after pix 3 is shown, it goes to index2.html.

prob 2: IE says "done, but with errors on page" on the bottom left corner of the browser. when viewing the error, it says "document.images.slide.filters is null or not an object." the funny thing is, if i refresh the page, this error goes away. don't know y. so, it is possible to get rid of this error?

thanks for all the help.

jscheuer1
09-29-2006, 04:54 PM
This script doesn't automatically change to another page, you need to click on a linked image in the slide show. So, either you are using a different script, I have misunderstood your question, or you have modified this script. Probably the latter but, who knows? From your description of the situation, it sounds as though the new page is being called but that the slide show is still running somehow. Maybe just that information will help but, we would need to see the exact code you are using to help more. The best thing would be to provide a link to a demo of the problem.

tuBBit
09-29-2006, 07:04 PM
yeah, i understand that this script doesn't do what i want it to do but i thought i'll give a shot of asking about it here. i was going to use the ultimate slideshow but this blending show gives great blending effect. although, this only works on IE, i'm satisfy cuz most ppl view the site will use IE.

if you go to http://www.peterluong.com, the index page plays the slideshow. first time going there, i'm sure you'll get an error. but if you refresh, it should be ok. so instead of having the show loops, i'd like it to go to another page after playing the set of images.

i hope this is doable or i'll need to use a different slideshow. my buddy and i were messing around with the code but we got no where...actually he did all the code, i just uploaded hee hee. if this doesn't work, do you have a recommendation for what slideshow i can use that does what i need?

thank you for taking your time to help me JOHN!

jscheuer1
09-30-2006, 03:47 PM
You are in violation of Dynamic Drive's usage policy. You need to keep the script credit on the page(s) that use the script.

Well, the slide show doesn't even slide in Opera, moves quite rapidly in FF and there seems to be no way to turn off the noise in either of those browsers. The no right click script makes it harder to diagnose the page but serves no useful purpose in protecting content. The error appears to stem from here:


document.images.slide.src=imageholder[whichimage].src

in your scripts.js file. This would only be (in a case like this) if that line of code were to run before there were a document.images.slide (which is an image tag on the page with its name attribute set to slide). This is in fact the case as the script call is in the head and the image tag is in the body. Before this script was made external, that part of it was in the body after the named image to which it refers.

tuBBit
09-30-2006, 07:15 PM
i didn't know that i violated Dynamic Drive's usage policy. according to the policy i read, i'm suppose to keep the "full source code by DD" credit or something like that in my script, which i did. so how am i violating the policy?

but JOHN, thank you for helping me. it was stupid of me for putting the 2 parts of the script into 1 script. i splitted them now and i think it's working.

the site owner told me not to worry about other browsers since most of the ppl that will be viewing that site will use IE.

again, thanks so much!

jscheuer1
10-01-2006, 01:10 AM
From the usage policy page:


Users agree not to remove/ edit the credit notice within the DHTML source code, or claim the code to be work of their own. What is the copyright notice? It appears inside the <script> tag of each script, and looks something like this:


/***********************************************
* Dynamic Countdown script- 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.
***********************************************/

Sometimes you may wish to move the DHTML script to an external .js file. In such instances, the credit notice must still be retained within the SCRIPT tags, in the page's visible source:


<script src="countdown.js" type="text/javascript">
/***********************************************
* Dynamic Countdown script- 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>

See:

http://www.dynamicdrive.com/notice.htm

for the full policy statement.

tuBBit
10-01-2006, 01:19 AM
ok, i got it. DD wants the credit not only in the external JS but also in the HTML that contains it.

i'm sorry, i misunderstood. i will write in the credit in all of the HTML pages. thanks!

for those of you that wants to be able to go to another page right after the show ends, here is the code that my buddy, jay, helped me with:


var whichlink=0
var whichimage=0
var blenddelay=document.images.slide.filters[0].duration*1000

function slideit() {
if (!document.images) return
document.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage].src
document.images.slide.filters[0].play()
whichlink=whichimage
if (whichimage<=slideimages.length-2) {
setTimeout("slideit()",slidespeed+blenddelay)
}
else {
window.location.href("url.html");
}
whichimage++;
}
slideit();