Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why is Javascript sometimes not working?

Hello -


I am a web programmer, and also design websites. One of my clients tells me that the javascript slide show on three of her pages is not working in Safari. She wants it fixed, but I have no idea why it isn't working. I don't own an Apple, so it is very difficult for me to debug this problem without some help.


1) It works fine in Internet Explorer and Firefox.


2) I have other javascripts on the same page, and they're working fine in Safari.


3) I went back to the ReadMe file for the script, "Ultimate Fade-in slideshow", and they indicated that it should work in Safari.


Since I didn't write the script myself, I am not even going to attempt to figure out how to change it to make it work ( it's a VERY long script ).


However, I'm wondering if anyone has experienced a similar problem, namely 1) and 2) above ( not necessarily the same script, but the same type of problem ). If so, then I'll attempt to find a work-around.


---

prof611


BTW, this question was originally posted 4 years ago on the Safari forum. I didn't get any satisfactory answers, and I can't add to that thread now, since it has been archived, so I'm reposting the question in this forum, at the suggestion of Allan Jones( Level 7 ). He also writes,


I visited your site with Safari 5 under OS 10.6.8 and see a big empty pane with a pink border near the top. The Safari Activity window shows no errors for the site. If i use FireFox 14 for Mac, I see an nice slide show. So Safari isn't happy with something.


Here is an offending page: http://www.simpleislandweddings.com/index2.shtml

None-OTHER, Windows 7

Posted on Aug 20, 2012 2:30 AM

Reply
6 replies

Aug 21, 2012 9:40 AM in response to msuper69

That's not a very useful reply, Michael. The reason why I stopped working on solving this problem 4 years ago is that I discovered that less than 1% of the viewers of the website were using an Apple. So I convinced the site owner that it wouldn't be wise for her to pay me to fix the problem, when there would be little, if any, return on her investment.


By the same token, why would I invest in purchasing an Apple, when the offending script has been working perfectly for the four years I've been using it, on this website and others, and even on an Apple using Firefox. It's certainly not in "beta testing".


I am revisiting the problem now, because I promised the new owner that I would make another attempt to find the bug. But he doesn't want to spend that much time or money on it either.


Here's another possibility: Does anybody know of a "Safari for PC" browser that actually simulates Safari on Mac? Four years ago, I found such an animal and downloaded it, but it did NOT exhibit the buggy behavior my Apple friends were observing, so was of no use to me.

Aug 21, 2012 10:36 AM in response to prof611

prof611 wrote:


The reason why I stopped working on solving this problem 4 years ago is that I discovered that less than 1% of the viewers of the website were using an Apple. So I convinced the site owner that it wouldn't be wise for her to pay me to fix the problem, when there would be little, if any, return on her investment.


And now you're having a big iPad hangover 🙂



By the same token, why would I invest in purchasing an Apple, when the offending script has been working perfectly for the four years I've been using it, on this website and others, and even on an Apple using Firefox. It's certainly not in "beta testing".


Because all those other browsers are likely to silently fix errors that are four years old. You should be using a Mac because it is the best development platform. This is the procedure:


1) Develop for Safari

2) Hack for IE 7 (if necessary)

3) Hack for IE 8

4) Check in Firefox and hack CSS if necessary

5) Check in Chrome

6) Check in IE 9

7) Repeat


I am revisiting the problem now, because I promised the new owner that I would make another attempt to find the bug. But he doesn't want to spend that much time or money on it either.


index.js:22 - SyntaxError: Expected token '{'

slideshow.js:191 - ReferenceError: Can't find variable: obj

index2.shtml:255 - TypeError: 'undefined' is not an object (evaluating 'document.location.protocol')


I'll send you a bill.

Aug 22, 2012 6:03 AM in response to msuper69

Michael Superczynski wrote:


Well if you're not going to invest in supporting OS X and Safari, just detect the browser/OS and tell the user their system isn't supported.


That's exactly what I have been doing for the past 4 years.


I tested for /Apple/.test(navigator.vendor), and if true, I wrote:

"The slideshows on this website will not work, since you are using Safari.Please view this site with a different browser."

Aug 22, 2012 6:15 AM in response to prof611

With a little push from etresoft, I solved the problem.


1. It turns out that there is a new Safari for PC, v 5.34.57.2, which I downloaded, and it shows the bug that was described to me.


2. When trying to locate and correct the bug, I decided to see if there was a newer version of the offending script. There was, and it worked properly in my new Safari browser.


I guess the moral for me is to look closer next time, and try to find a solution before posting in a forum.


Thanks to all who helped!

Why is Javascript sometimes not working?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.