jon_hill987 Posted September 30, 2005 Share Posted September 30, 2005 Ok, I'm doing the company website at work (it isn't exactly in my job description but they don't really wan't to get someone in to do it and i said I could) Anyway, i decided that it would be nice to have pictures running like a slideshow on it. This wasn't a problem, i did a search and came up with the folowing http://www.cryer.co.uk/resources/javascript/script12slideshow.htm The scipt works nicely and I don't really wan't to change it. The problem is, that I need each picture to have a different link on it. Does anyone know how to do that? Also that page says If this script were to be used in a number of pages then it might be best included in a separate script file instead of being embedded directly in a web page. How would i go about doing that? Link to comment Share on other sites More sharing options...
coupes. Posted September 30, 2005 Share Posted September 30, 2005 Check out the code I made, you shouldn't have a problem understanding and modifing it. BTW, Java and Javascript are two completely different thing... slideshow.zip Link to comment Share on other sites More sharing options...
Samuel Dravis Posted September 30, 2005 Share Posted September 30, 2005 Don't really have time to look at it right now, but this might be useful to you.. Link to comment Share on other sites More sharing options...
jon_hill987 Posted October 1, 2005 Author Share Posted October 1, 2005 Check out the code I made, you shouldn't have a problem understanding and modifing it. BTW, Java and Javascript are two completely different thing... Thanx, Ill have a look at that, and as for not knowing the difference... That's why I am a n00b. Don't really have time to look at it right now, but this might be useful to you.. Will take a look now. Thanx for the help. @coupes, could you explain this line in some more detail for me document.getElementById("divBannerRotation").innerHTML = unescape("<a href='" + this.links[0] + "' target='_blank'><img src='" + this.images[0] + "' width='" + this.width + "' height='" + this.height + "' border=0></a>"); I wan't to add some of the features of the other slide show in such as the fade and precaching, and it was this line that it was put into the other script. Link to comment Share on other sites More sharing options...
jon_hill987 Posted October 4, 2005 Author Share Posted October 4, 2005 Ok, I changed this part of your script: function rotation() { document.getElementById("divBannerRotation").style.filter="blendTrans(duration=2)"; document.getElementById("divBannerRotation").filters.blendTrans.Apply(); document.getElementById("divBannerRotation").innerHTML = unescape("<a href='" + this.links[0] + "' target='_blank'><img src='" + this.images[0] + "' width='" + this.width + "' height='" + this.height + "' border=0></a>"); document.getElementById("divBannerRotation").filters.blendTrans.Play(); // the 1st is removed and placed at the end of the list whichLink = this.links[0]; this.links.splice(0,1); this.links.push(whichLink); whichImages = this.images[0]; this.images.splice(0,1); this.images.push(whichImages); obj = this; setTimeout('obj.rotate()',2000); } To try to get the crossfade to work but it changes nothing, what am I missing? Link to comment Share on other sites More sharing options...
ChAiNz.2da Posted October 4, 2005 Share Posted October 4, 2005 To try to get the crossfade to work but it changes nothing, what am I missing? Are you trying to view this in Firefox? HTML (java) Page Transitions tend to only work in IE (yet more standards that MS has given the finger to)...so I wonder if banner transitions work the same? My site uses page transition effects, but only IE users will actually see it. I'm on Firefox, so I can't even enjoy my own work Link to comment Share on other sites More sharing options...
jon_hill987 Posted October 4, 2005 Author Share Posted October 4, 2005 Are you trying to view this in Firefox? HTML (java) Page Transitions tend to only work in IE (yet more standards that MS has given the finger to)...so I wonder if banner transitions work the same? My site uses page transition effects, but only IE users will actually see it. I'm on Firefox, so I can't even enjoy my own work No, I'm at work so am using IE. Link to comment Share on other sites More sharing options...
coupes. Posted October 5, 2005 Share Posted October 5, 2005 @coupes, could you explain this line in some more detail for me document.getElementById("divBannerRotation").innerHTML = unescape("<a href='" + this.links[0] + "' target='_blank'><img src='" + this.images[0] + "' width='" + this.width + "' height='" + this.height + "' border=0></a>"); Basically, what this line does is retreive the element with the id "divBannerRotation" (a div element in our case) and changes it's contents using the first element of the "links" list as the link (this.links[0]) and the first element of the "images" list as the images (this.images[0]). Then, the firs element of either list is removed and placed at the end of the list, so the next time the function is called, the content of the "divBannerRotation" element will be different. Link to comment Share on other sites More sharing options...
jon_hill987 Posted October 11, 2005 Author Share Posted October 11, 2005 Well, it seems that the blend dosn't work with the script you provided, thanx anyway. I found another script which works (it used captions instead of having the image as a link) so all is good except when i checked it in other browsers. IE: fine Firefox: no fade but still works Opera: Event thread: load Error: name: TypeError message: Statement on line 64: Could not convert undefined or null to object Backtrace: Line 64 of inline#1 script in http://www.ics-robotics.co.uk/case0.htm document.images.PictureBox.filters.blendTrans.Apply(); Line 1 of script runSlideShow(); At unknown location [statement source code not available] i don't think it is too big a problem as not many business PC's will use Opera, but if anyone can help me sort it it would be good. the page is http://www.ics-robotics.co.uk/case0.htm Also if someone with a mac can tell me what the page looks like it would be helpfull. Cheers. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.