<?xml version="1.0"?>
<rss version="2.0">
 <channel>
  <title>javascript slideshow bug in Safari | WPDFD.com Forums</title>
  <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/</link>
  <description>A Scripting forum thread at WPDFD.com</description>
  <language>en-us</language>
  <pubDate>10/12/04, 286 13 2004 2004:%i:1097576024 06:13:44</pubDate>
  <lastBuildDate>06/07/13, 158 05 2013 2013:%i:1370588757 03:05:57</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>NineLabs Framework Feed Generator</generator>
  <managingEditor>sitemaster@wpdfd.com</managingEditor>
  <webMaster>sitemaster@wpdfd.com</webMaster>
     <item>
    <title>Couic  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1414</link>
    <description><![CDATA[Would you have any advice on how to fix this slideshow javascript? it seems to be working fine with IE and Firefox but not with Safari : if the new image loading is larger than the previews one, then all the images being displayed after that will stretch to have the same width as the largest picture.<br /><code><br />&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;<br />&quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;<br />&lt;html&gt;<br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;<br />&lt;title&gt;New&lt;/title&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />&lt;!--<br />var num=1,mode;<br />img1 = new Image ()<br />img1.src = &quot;1.jpg&quot;<br />img2 = new Image ()<br />img2.src = &quot;2.jpg&quot;<br />img3 = new Image ()<br />img3.src = &quot;3.jpg&quot;<br />img4 = new Image ()<br />img4.src = &quot;4.jpg&quot;<br />img5 = new Image ()<br />img5.src = &quot;5.jpg&quot;<br /><br />function slideshowUp() {<br />num++;<br />mode=0;<br />if (num&gt;=6) {num=1}<br />document.images['mypic'].src=eval(&quot;img&quot;+num+&quot;.src&quot<img src="/images/emoticons/wink.png" class="smiley" />;<br />}<br /><br />function slideshowBack() {<br />num--;<br />mode=1;<br />if (num&lt;=0) {num=4}<br />document.images['mypic'].src=eval(&quot;img&quot;+num+&quot;.src&quot<img src="/images/emoticons/wink.png" class="smiley" />;<br />}<br /><br />function Bobiner(){<br />if (mode==0) {<br />num++;<br />slideshowUp();<br />} else if (mode==1) {<br />slideshowBack();<br />}<br />}<br />//--&gt;<br />&lt;/script&gt;<br /><br />&lt;/head&gt;<br /><br /><br />&lt;body&gt;<br />&lt;CENTER&gt;<br />&lt;p align=&quot;center&quot;&gt;&lt;IMG SRC=&quot;1.jpg&quot; NAME=&quot;mypic&quot; BORDER=0 onerror=&quot;Bobiner();&quot;&gt;&lt;/p&gt;<br />&lt;/p&gt;<br />&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;main.gif&quot; width=&quot;188&quot; height=&quot;50&quot; border=&quot;0&quot; usemap=&quot;#Map&quot;&gt;<br />&lt;map name=&quot;Map&quot;&gt;<br />&lt;area shape=&quot;rect&quot; coords=&quot;-20,4,33,47&quot; href=&quot;JavaScript:slideshowBack()&quot;&gt;<br />&lt;area shape=&quot;rect&quot; coords=&quot;157,3,194,46&quot; href=&quot;JavaScript:slideshowUp()&quot;&gt;<br />&lt;area shape=&quot;rect&quot; coords=&quot;68,3,121,48&quot; href=&quot;http://www.my site.com&quot;&gt;<br />&lt;/map&gt;<br />&lt;/p&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;<br /><br /></code>]]></description>
    <pubDate>10/12/04, 286 13 2004 2004:%i:1097576024 06:13:44</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1414</guid>
   </item>
     <item>
    <title>Joe Gillespie said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1415</link>
    <description><![CDATA[Safari is below par when it comes to JavaScript but this particular script looks pretty long-in-the-tooth anyway. It is not valid HTML, so anything can happen in modern browsers.<br /><br />In scripts like this, it is best to stick with images of the same size. If the images are GIF or PNG, you could pad them out with transparent borders. As they are JPGs, you can't do that.<br /><br />I think that you need a more modern CSS-based slideshow. If you can't find one, I'll do one for the next editorial.]]></description>
    <pubDate>10/12/04, 286 12 2004 2004:%i:1097579546 07:12:26</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1415</guid>
   </item>
     <item>
    <title>Couic  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1416</link>
    <description><![CDATA[Thanx for your answer. My intention using that script was to have a page presenting &nbsp;a slideshow of jpgs that I have no control over because they are uploaded by users via a php interface. In my example the amount of images is limited (it really is a much higher amount) and the onError fonction is here to rewind the slideshow when visitors reach the last image present in the folder. ]]></description>
    <pubDate>10/12/04, 286 57 2004 2004:%i:1097582239 07:57:19</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1416</guid>
   </item>
     <item>
    <title>Joe Gillespie said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1417</link>
    <description><![CDATA[So anybody could upload any image of any size ??? Dangerous.<br /><br />If you set the img size to, say 200 x 300, any image uploaded would be scaled to fit. If you tell people that their images will be scaled if they are not the 'correct' size, they might make an effort. Either way, it would solve your immediate problem.]]></description>
    <pubDate>10/12/04, 286 56 2004 2004:%i:1097585804 08:56:44</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1417</guid>
   </item>
     <item>
    <title>Couic  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1418</link>
    <description><![CDATA[The images are all the same hight (400) but they can vary in width... <img src="/images/emoticons/sidesmile.png" class="smiley" />]]></description>
    <pubDate>10/12/04, 286 31 2004 2004:%i:1097587897 09:31:37</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1418</guid>
   </item>
     <item>
    <title>Jgold723  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1419</link>
    <description><![CDATA[I have the very same problem with a different slide show script. Did you have any luck resolving this? My script is below. You can see it in action at http://www.natashakempers-cullen.com/quilts-slide.shtml.<br /><br />It works fine in everything, except Safari.<br /><br />John<br /><br />&lt;script language=&quot;JavaScript&quot;&gt;<br />&lt;!--<br />var imgArray = new Array(&quot;g-color.jpg&quot;,&quot;g-fifty.jpg&quot;,&quot;g-heart.jpg&quot;,&quot;g-jazz.jpg&quot;,&quot;g-love1.jpg&quot;,&quot;g-love2.jpg&quot;,&quot;g-mandala.jpg&quot;,&quot;g-sonata.jpg&quot;,&quot;g-spindle.jpg&quot;,&quot;g-stephanie.jpg&quot;,&quot;g-stretch.jpg&quot;,&quot;g-pieces.jpg&quot;,&quot;g-journey.jpg&quot;,&quot;g-dancing.jpg&quot;,&quot;g-joie.jpg&quot;,&quot;g-leap.jpg&quot<img src="/images/emoticons/wink.png" class="smiley" />;<br /><br />var descArray = new Array(&quot;Color Jazz&quot;,&quot;50 Something!&quot;,&quot;Heart of Lightness&quot;,&quot;Jazz&quot;,&quot;Love Letters 1&quot;,&quot;Love letters 2&quot;,&quot;Mandala Meditation&quot;,&quot;Sonata for CW&quot;,&quot;Spindleworks&quot;,&quot;Stephanie's Quilt&quot;,&quot;Stretch, Breathe&quot;,&quot;Pieces&quot;,&quot;Journey&quot;,&quot;Dancing in the Shadows&quot;,&quot;Joie de Vivre&quot;,&quot;Leap of Faith&quot<img src="/images/emoticons/wink.png" class="smiley" />;<br /><br />var urlArray = new Array(&quot;javascript:open_window('colorjazz.shtml')&quot;,&quot;javascript:open_window('fifty.shtml')&quot;,&quot;javascript:open_window('heart.shtml')&quot;,&quot;javascript:open_window('jazz.shtml')&quot;,&quot;javascript:open_window('love.shtml')&quot;,&quot;javascript:open_window('love.shtml')&quot;,&quot;javascript:open_window('mandala.shtml')&quot;,&quot;javascript:open_window('sonata.shtml')&quot;,&quot;javascript:open_window('spindle.shtml')&quot;,&quot;javascript:open_window('stephanie.shtml')&quot;,&quot;javascript:open_window('stretch.shtml')&quot;,&quot;javascript:open_window('pieces.shtml')&quot;,&quot;javascript:open_window('journey.shtml')&quot;,&quot;javascript:open_window('dancing.shtml')&quot;,&quot;javascript:open_window('joie.shtml')&quot;,&quot;javascript:open_window('leap.shtml')&quot<img src="/images/emoticons/wink.png" class="smiley" />;<br /><br /><br /><br />var imgDir = &quot;&quot;;<br />var pos = 0;<br /><br />if (document.images) {<br /> &nbsp; &nbsp;for (i=0; i&lt;imgArray.length; i++) {<br /> &nbsp; &nbsp; &nbsp; &nbsp;eval(&quot;imgObj&quot; + i + &quot;= new Image()&quot<img src="/images/emoticons/wink.png" class="smiley" />;<br /> &nbsp; &nbsp; &nbsp; &nbsp;eval(&quot;imgObj&quot; + i + &quot;.src = '&quot; + imgDir + imgArray<i> + &quot;'&quot<img src="/images/emoticons/wink.png" class="smiley" />;<br /> &nbsp; &nbsp;}<br />}<br /><br /><br />function toPrevious() {<br /><br />if (pos == 0) { pos = imgArray.length - 1; }<br />else { pos = pos - 1 };<br /><br /> eval(&quot;document.vvr.src = imgObj&quot;+pos+&quot;.src&quot<img src="/images/emoticons/wink.png" class="smiley" />;<br />document.getElementById(&quot;theForm&quot<img src="/images/emoticons/wink.png" class="smiley" />.innerHTML = descArray[pos];<br /><br />}<br /><br />function toNext() {<br /><br />if (pos == imgArray.length - 1) { pos = 0; }<br />else { pos = pos + 1; }<br /><br /> &nbsp; &nbsp;eval(&quot;document.vvr.src = imgObj&quot;+pos+&quot;.src&quot<img src="/images/emoticons/wink.png" class="smiley" />;<br /> &nbsp; &nbsp;document.getElementById(&quot;theForm&quot<img src="/images/emoticons/wink.png" class="smiley" />.innerHTML = descArray[pos]<br /> &nbsp; &nbsp;document.links[9].href = urlArray[pos];<br /> &nbsp; &nbsp;<br />}<br /><br /><br />//--&gt;<br />&lt;/script&gt;<br /><br /><br /> &lt;table width=&quot;450&quot; align=center&gt;<br /> &nbsp; &nbsp; <br /> &nbsp; <br /> &nbsp; &nbsp; <br /> &nbsp; &nbsp; &nbsp;&lt;tr&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp;&lt;td colspan=&quot;3&quot; align=&quot;CENTER&quot;&gt;&lt;A HREF=&quot;javascript:open_window('colorjazz.shtml')&quot;&gt;&lt;img src=&quot;g-color.jpg&quot; name=&quot;vvr&quot;&gt;&lt;/a&gt;&lt;/td&gt;<br /> &nbsp; &nbsp; &nbsp;&lt;/tr&gt;<br /> &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp;&lt;tr&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp;&lt;td align=&quot;left&quot; valign=middle width=20&gt;&lt;a href=&quot;javascript:toPrevious()&quot; onMouseOver=&quot;self.status='Previous'; return true;&quot; onMouseOut=&quot;self.status=''; return true;&quot;&gt;&lt;img src=&quot;button-left.gif&quot; border=&quot;0&quot;&gt;&lt;/td&gt;<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;&lt;td valign=middle align=center width=410 id=theForm&gt;Color Jazz&lt;/td&gt;<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;&lt;td align=&quot;right&quot; valign=middle width=20&gt;&lt;a href=&quot;javascript:toNext()&quot; onMouseOver=&quot;self.status='Next'; return true;&quot; onMouseOut=&quot;self.status=''; return true;&quot;&gt;&lt;img src=&quot;button-right.gif&quot; border=&quot;0&quot;&gt;&lt;/td&gt;<br /> &nbsp; &nbsp; &nbsp;&lt;/tr&gt;<br /> &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp;&lt;td colspan=&quot;3&quot; align=&quot;CENTER&quot;&gt;&lt;hr style=&quot;height:1px; style:solid; color:#ffffff&quot;&gt;&lt;br&gt;&lt;a class=&quot;close&quot; href=&quot;javascript:window.close('filename.html')&quot;&gt;&lt;span class=&quot;bodytext&quot;&gt;close this window&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<br />]]></description>
    <pubDate>11/18/04, 323 50 2004 2004:%i:1100814632 16:50:32</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1419</guid>
   </item>
     <item>
    <title>Joe Gillespie said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1420</link>
    <description><![CDATA[If you've run the script through Mozilla or Firefox JavaScript debugger and it all seems okay, it will be Safari's fault. Safari is very lame when it comes to JavaScript, especially if you aren't using the very latest one.]]></description>
    <pubDate>11/19/04, 324 59 2004 2004:%i:1100843959 00:59:19</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1420</guid>
   </item>
     <item>
    <title>Joe Gillespie said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1421</link>
    <description><![CDATA[I've looked at the page in the latest Safari and the JavaScript runs fine but as you haven't specified any image sizes, every image is resizing to the same size as the first image. You need to make them all the same size or use a different CSS-based technique.<br /><br />I have CSS-based slide shows at<br /><br />http://www.wpdfd.com/editorial/wpd0103.htm#feature<br /><br />and<br /><br />http://www.minifonts.com/gallery.html<br /><br />that you can swipe.]]></description>
    <pubDate>11/19/04, 324 08 2004 2004:%i:1100844502 01:08:22</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1421</guid>
   </item>
     <item>
    <title>Jgold723  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1422</link>
    <description><![CDATA[Hey -- very neat CSS stuff! Thanks for the reply -- I'll take a look.<br /><br />John<br />]]></description>
    <pubDate>11/19/04, 324 48 2004 2004:%i:1100872107 08:48:27</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1422</guid>
   </item>
     <item>
    <title>Gendem  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1423</link>
    <description><![CDATA[An interesting solution to be sure, but it sure does add to the file size. &nbsp;Conside having 35 images in a slide show (which I do). &nbsp;Thant means 35 blocks of CSS in addition to the javascript to control it, as opposed to just the javascript. <br /><br />I am seeing the same problem: that subsequent images inheirit the size of previous images in a javascript slideshow when no img dimentions are specified and the image widths vary, only in safari.<br /><br />Is there no solution to this problem that doesn't involve resizing all images to be the same width?<br /><br />...Mike]]></description>
    <pubDate>03/15/05, 074 31 2005 2005:%i:1110911486 13:31:26</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/javascript_slideshow_bug_in_safari/#p1423</guid>
   </item>
   </channel>
</rss