0

My friend built a website with GoDaddy.com's Website Builder, and he asked me to add a simple slideshow to it. I'm about as big of a novice as can be when it comes to JavaScript, but I found some code that I was able to modify to create what he wanted. (The code that I found is here: http://www.2createawebsites.com/image-slide-show-2.php) My modified code is below:

<script type="text/javascript" src="http://www.2createawebsites.com/resources/howtocreateawebsitefadeslide.js"></script>   
<script type="text/javascript">  
var mygallery = new fadeSlideShow({
    wrapperid: "fadeshow2",
    dimensions: [645, 300],
    imagearray: [
        ["https://cache.nebula.phx3.secureserver.net/obj/NEI5NDhBRDJBODdCMzc5NzQwNkI6OWY4NjEzNjA4NWIxMjIwZWRiZDM3YjYxZDAxZWUyMTU=?uid=0eb2a385-f05b-4183-84fb-f593b956edfe", "https://appelbrassandwoodwind.com/Schedule_Repair.html", "_new"],
        ["https://cache.nebula.phx3.secureserver.net/obj/NEI5NDhBRDJBODdCMzc5NzQwNkI6Y2UzNTg1M2MwOWNlZTFlN2I3OTI4OWEwMDhlM2Y1YmU=?uid=4dcdb1ea-535a-45b3-9cdf-e449f7a6ffde", "https://appelbrassandwoodwind.com/Instrument_Purchase.html", "_new"],
        ["https://cache.nebula.phx3.secureserver.net/obj/NEI5NDhBRDJBODdCMzc5NzQwNkI6MWJlOWNmMjkzNzc0MmE4MGI3ODlhZGYyZWQyZmJjYjQ=?uid=f87212cc-b629-474f-a4a9-7f56de88c1fc", "https://appelbrassandwoodwind.com/Instrument_Rental.html", "_new"],
        ["https://cache.nebula.phx3.secureserver.net/obj/NEI5NDhBRDJBODdCMzc5NzQwNkI6MDY3OWRiNDU3Yzg0YzMxNjIxMGY0YjMwNDk4ZDcwZjE=?uid=ab991519-85e4-4a5e-aea4-d6448f0d6708", "https://appelbrassandwoodwind.com/Beginner_Layaway.html", "_new"],
        ["https://cache.nebula.phx3.secureserver.net/obj/NEI5NDhBRDJBODdCMzc5NzQwNkI6YmE1N2Q0YmE0Y2RlMjQzNjRiMDg4MGYwZWUwZDg5YmU=?uid=f8e39740-fe7b-4d3d-a371-b23a89056651", "https://appelbrassandwoodwind.com/Teacher_List.html", "_new"]
    ],
    displaymode: {
        type: 'auto',
        pause: 2500,
        cycles: 0,
        wraparound: false
    },
    persist: false, //remember last viewed slide and recall within same session?   
    fadeduration: 1500, //transition duration (milliseconds)  
    descreveal: "ondemand",
    togglerid: ""
})
 </script>

<div id="fadeshow2"></div>

The resulting slide show can be viewed below the "Home Page" text at (https://appelbrassandwoodwind.com/). The slide show works perfectly in IE, FireFox and Safari, but it does not work in Chrome. When I hit F12 in Chrome and go to the console, I get the following: Uncaught ReferenceError: fadeSlideShow is not defined. I followed the "src" path in the script to make sure that the fadeSlideShow function is defined there and I confirmed that it is. Therefore, I don't understand why I'm getting this error, especially because the other browsers display the slide show as expected.

I performed an extensive search of this issue and while I found that other people had this problem, either no solutions were offered or the ones that were offered were way over my head. Any help would be greatly appreciated.

Thanks!

karthikr
  • 97,368
  • 26
  • 197
  • 188

1 Answers1

3

I also get this warning:

[blocked] The page at https://appelbrassandwoodwind.com/ ran insecure content from http://www.2createawebsites.com/resources/howtocreateawebsitefadeslide.js.

Because your page is requested with "https" but you're including the resource with "http". Try changing your <script> to be:

<script type="text/javascript" src="//www.2createawebsites.com/resources/howtocreateawebsitefadeslide.js"></script>

Notice the lack of the "http:". This will request the external resource with the same protocol as your page's.

Here's some information on protocol-less URLs:

Community
  • 1
  • 1
Ian
  • 50,146
  • 13
  • 101
  • 111
  • Thanks so much for your detailed response, Ian. I tried removing the "http" from my "src" path but unfortunately I'm now getting a "Failed to load resource" error in addition to the "Uncaught ReferenceError", and I still don't see the slideshow in Chrome. I may just look for a different way to do this. I appreciate the help though! – ChiWhiteSox56 Apr 18 '13 at 19:49
  • @ChiWhiteSox56 Did you remove "http:" or "http"? The URL needs to start with "//" – Ian Apr 18 '13 at 19:50
  • I did it just like this: – ChiWhiteSox56 Apr 18 '13 at 19:55
  • @ChiWhiteSox56 Yes, and that works fine. I can see it's fine in my browser. Are you looking at the console though? I get several other errors that are unrelated – Ian Apr 18 '13 at 20:01
  • @ChiWhiteSox56 Actually, your page has two references to the same library. One is to a local version, one is to the external version. And the external version's URL **isn't** changed – Ian Apr 18 '13 at 20:02
  • So you can see the animation in Chrome? I am looking at the Chrome console, but I only get the two errors that I mentioned above in Chrome. When I look at the console in FireFox, I see all of those unrelated errors that you've mentioned but not the ones that I see in Chrome. I should also mention that I do have JavaScript enabled for Chrome. – ChiWhiteSox56 Apr 18 '13 at 22:39
  • I'm also unsure where to find this external reference that you mentioned where the URL isn't changed. The only modification that I made to this entire site was to add this animation, and I removed the "http:" from the line of code that you showed me above. Thanks so much for your help, and thanks for being patient! – ChiWhiteSox56 Apr 18 '13 at 22:45
  • @ChiWhiteSox56 I'm sorry, I was looking at the website http://www.2createawebsites.com/image-slide-show-2.php when I saw those extra errors. When I look at your website, I still get the same error about blocked content, which means the URL wasn't changed. Maybe it's because it's been a long time since your comment and you've changed it yourself, but I don't see any change at https://appelbrassandwoodwind.com/ – Ian Apr 19 '13 at 04:04
  • No problem. I did try changing the "src" URL to not have the "http:" and when I did that, I wasn't able to see the animation in the other browsers at all, so I changed it back. I contacted someone at GoDaddy.com who is familiar with the Website Builder and showed them my code, so I'm hoping they can tell me what's going on here. I'll keep you posted. Thanks for your help! – ChiWhiteSox56 Apr 20 '13 at 15:56