PDA

View Full Version : add links in Swiss Army Image Slideshow



csseur
02-28-2008, 02:22 PM
1) Script Title: Swiss Army Image Slideshow

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

3) Describe problem: Holé, i want to know if it is possible to add differents links href on the images?

bye,
fred

jscheuer1
02-28-2008, 02:29 PM
Adding a third item in the array entry for an image will give that image that link:


slides3[2] = ["3_side.jpg", "caption", "http://www.dynamicdrive.com"];

csseur
02-29-2008, 10:18 AM
Adding a third item in the array entry for an image will give that image that link:


slides3[2] = ["3_side.jpg", "caption", "http://www.dynamicdrive.com"];


thanks,

i have try this:


<script type="text/javascript">
var preload_ctrl_images=true;
var previmg='left.gif';
var stopimg='stop.gif';
var playimg='play.gif';
var nextimg='right.gif';
var slides=[]; //FIRST SLIDESHOW
slides[0] = ["img/accueil/bann/candidats.png", "candidats", "http://www.candidats.fr/"];
slides[1] = ["img/accueil/bann/vote.png", "vote", "http://www.ordinateurs-de-vote.org/"];
slides[2] = ["img/accueil/bann/racketiel.png", "racketiels", "http://www.racketiciel.info/"];
slides[2] = ["img/accueil/bann/vivofoot.png", "vivofoot", "http://www.vivofoot.com/"];
</script>
<script type="text/javascript" src="js/swissarmy.js"></script>

but nothing appears...

why?

and my code for the pahe body:


<p>
<script type="text/javascript">
new inter_slide(slides)
</script>
</p>

++

jscheuer1
02-29-2008, 02:43 PM
That should do it, try clicking on those linked images.

However, I think that perhaps you may want the captions to be linked. You can add links directly to the caption text:


slides3[2] = ["3_side.jpg", "<a href='http://www.dynamicdrive.com'>caption<\/a>", "http://www.dynamicdrive.com"];

If you are still having problems, let me know which browser and version you are using, and give me a link to the problem page.

csseur
02-29-2008, 04:33 PM
i have try this:


<script type="text/javascript">
var preload_ctrl_images=true;
var previmg='left.gif';
var stopimg='stop.gif';
var playimg='play.gif';
var nextimg='right.gif';
var slides3=[]; //FIRST SLIDESHOW
slides3[0] = ["img/accueil/bann/candidats.png", "candidats", "http://www.candidats.fr/"];
slides3[1] = ["img/accueil/bann/vote.png", "vote", "http://www.ordinateurs-de-vote.org/"];
slides3[2] = ["img/accueil/bann/racketiel.png", "racketiels", "http://www.racketiciel.info/"];
slides3[3] = ["img/accueil/bann/vivofoot.png", "vivofoot", "http://www.vivofoot.com/"];
slides3.no_descriptions=1; //use for no descriptions displayed
slides3.pause=1; //use for pause onmouseover
slides3.image_controls=1; //use images for controls
slides3.button_highlight='#cccccc'; //onmouseover background-color for image buttons (requires image_controls=1)
slides3.specs='width=300, height=250' //global specifications for this show's new window(s)
slides3.random=1; //set a random slide sequence on each page load
slides3.manual_start=1; //start show in manual mode (stopped)
</script>
<script type="text/javascript" src="js/swissarmy.js">
/***********************************************
* Swiss Army Image slide show script - © John Davenport Scheuer: http://home.comcast.net/~jscheuer1/
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full original source code
***********************************************/
</script>

but not working..

my page: http://www.strapontins.org/ and see under the paragraph "Édito"

++

csseur
02-29-2008, 04:36 PM
so, with this:


<script type="text/javascript">
var preload_ctrl_images=true;
var previmg='left.gif';
var stopimg='stop.gif';
var playimg='play.gif';
var nextimg='right.gif';
var slides=[]; //FIRST SLIDESHOW
slides[0] = ["img/accueil/bann/candidats.png", "candidats", "http://www.candidats.fr/"];
slides[1] = ["img/accueil/bann/vote.png", "vote", "http://www.ordinateurs-de-vote.org/"];
slides[2] = ["img/accueil/bann/racketiel.png", "racketiels", "http://www.racketiciel.info/"];
slides[3] = ["img/accueil/bann/vivofoot.png", "vivofoot", "http://www.vivofoot.com/"];
</script>

only "candidats" or "vote" appears, and not images :/ but the directory are good

csseur
02-29-2008, 04:40 PM
oh, with Opera (9.50 Beta 1) , is working! but not with firefox, why?

jscheuer1
02-29-2008, 04:51 PM
That's not the code that you have on your page, and this image:


http://www.strapontins.org/img/accueil/bann/racketiel.png

is not found on the server (it may be missing, somewhere else, corrupted, or just mispelled - upper and lower case letters matter in filenames on the web).

That missing image will kill the slide show in IE. In others, it just goes along without it. In Opera, for example it does, and the images that are there are linked.