By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

Slideshow links

P: 2
Found this neat slideshow javascript with linked images. Is it at all possible to change the properties (height, with, etc.) of the opened window of every individual link?

Expand|Select|Wrap|Line Numbers
  1.  <script language="JavaScript1.1"> 
  2. <!--
  3.  
  4. /*
  5. JavaScript Image slideshow:
  6. By JavaScript Kit (www.javascriptkit.com)
  7. Over 200+ free JavaScript here!
  8. */
  9.  
  10. var slideimages=new Array()
  11. var slidelinks=new Array()
  12. function slideshowimages(){
  13. for (i=0;i<slideshowimages.arguments.length;i++){
  14. slideimages[i]=new Image()
  15. slideimages[i].src=slideshowimages.arguments[i]
  16. }
  17. }
  18.  
  19. function slideshowlinks(){
  20. for (i=0;i<slideshowlinks.arguments.length;i++)
  21. slidelinks[i]=slideshowlinks.arguments[i]
  22. }
  23.  
  24. function gotoshow(){
  25. if (!window.winslide||winslide.closed)
  26. winslide=window.open(slidelinks[whichlink])
  27. else
  28. winslide.location=slidelinks[whichlink]
  29. winslide.focus()
  30. }
  31.  
  32. //-->
  33. </script>
  34.  
  35. <a href="javascript:gotoshow()"><img src="food1.jpg" name="slide" border=0 width=300 height=375></a>
  36. <script>
  37. <!--
  38.  
  39. //configure the paths of the images, plus corresponding target links
  40. slideshowimages("food1.jpg","food2.jpg","food3.jpg","food4.jpg","food5.jpg")
  41. slideshowlinks("http://food.epicurious.com/run/recipe/view?id=13285","http://food.epicurious.com/run/recipe/view?id=10092","http://food.epicurious.com/run/recipe/view?id=100975","http://food.epicurious.com/run/recipe/view?id=2876","http://food.epicurious.com/run/recipe/view?id=20010")
  42.  
  43. //configure the speed of the slideshow, in miliseconds
  44. var slideshowspeed=2000
  45.  
  46. var whichlink=0
  47. var whichimage=0
  48. function slideit(){
  49. if (!document.images)
  50. return
  51. document.images.slide.src=slideimages[whichimage].src
  52. whichlink=whichimage
  53. if (whichimage<slideimages.length-1)
  54. whichimage++
  55. else
  56. whichimage=0
  57. setTimeout("slideit()",slideshowspeed)
  58. }
  59. slideit()
  60.  
  61. //-->
  62. </script>
  63. <p align="center"><font face="arial" size="-2">This free script provided by</font><br>
  64. <font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
  65. Kit</a></font></p>
  66.  
Jun 24 '06 #1
Share this Question
Share on Google+
3 Replies


Banfa
Expert Mod 5K+
P: 8,964
I quick glance suggests not because the script does not necessarily open a new window for each new picture displayed.
Jun 25 '06 #2

P: 2
I quick glance suggests not because the script does not necessarily open a new window for each new picture displayed.
Thanks very much for the reply! Could you perhaps suggest another simple script which does support the the possibility to change the size of each new picture?
Aug 2 '06 #3

P: 7
Here is an image viewer, that opens images in a new window when clicked.

It's in object-oriented, cross-browser JavaScript. Very easy to plug and play, with "slide show" feature, and fully customisable in CSS and HTML:

JavaScript image viewer

Article includes a demo, source code, explanations.

Hope this helps...
Sep 25 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.