JavaScript & Safari 2.x Question

Hi,

I have posted a calendar at:
http://www.yenco.com/calendar

The index.html page uses JavaScript to redirect site visitors to the appropriate page in the calendar. This seems to be working rather well, but I recently received an email from someone with Mac OS X 10.4.10 running Safari 2.x (she can’t upgrade to 10.4.11 w/ Safari 3 because the OS update doesn’t work with her Epson scanner).

When she visits the test site above, the index.html page loads and… never redirects her to the appropriate calendar page. (And yes her preference is set to enable JavaScript). I’m thinking there is probably something in the JavaScript that is either not supported or broken in Safari 2.x.

Are there any JavaScript experts here that have tackled this (or similar) problems with Safari 2.x and might be able and willing to help me solve this?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 15/9/08 (at 09:49 -0400) Mike Yenco said:

I’m thinking there is probably something in the JavaScript that is
either not supported or broken in Safari 2.x.

I’d just add that this is something generated by Mike’s nifty Agenda
application, which ships with Freeway templates for creating custom
calendar pages. A nice Freeway-friendly touch - which deserves our
help!

Sadly, I am not a JavaScript expert. Dang! :frowning:

k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I looked at the page source and the scripts, and found the usual well-
written code I would expect from you. There is one character in the
calRedirect.js in the first line that is not encoded properly, and I
suspect that is what is throwing Safari off.

Change the © to ( c ) and you should be good. Or, change the
character set of the script to UTF-8 and carry on using the © character.

It appears as though the script was saved in some random charset
(maybe Windows or Mac Western) along the way, and this character
didn’t get converted. Safari expects all code to be written in UTF-8
unless declared otherwise (since it’s written to the standards). Your
script tag doesn’t declare what charset the linked file is saved in,
so it assumes UTF-8. Apparently newer versions of Safari are more
lenient about this.

Walter

On Sep 15, 2008, at 9:49 AM, Mike Yenco wrote:

Hi,

I have posted a calendar at:
http://www.yenco.com/calendar

The index.html page uses JavaScript to redirect site visitors to
the appropriate page in the calendar. This seems to be working
rather well, but I recently received an email from someone with Mac
OS X 10.4.10 running Safari 2.x (she can’t upgrade to 10.4.11 w/
Safari 3 because the OS update doesn’t work with her Epson scanner).

When she visits the test site above, the index.html page loads
and… never redirects her to the appropriate calendar page. (And
yes her preference is set to enable JavaScript). I’m thinking
there is probably something in the JavaScript that is either not
supported or broken in Safari 2.x.

Are there any JavaScript experts here that have tackled this (or
similar) problems with Safari 2.x and might be able and willing to
help me solve this?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

I can’t really take all that much credit for the code on the pages. The javascript is largely the work of a fellow SuperCard developer: Bruce Martin who is credited in the calRedirect.js file. And the HTML code in the templates is generated with Freeway, so credit to Softpress there. The only part of that side of the equation that I worked on was the design of the templates and working in placeholder text that Agenda 4 substitutes with event or journal data.

You were spot on with the © symbol catch. Bruce was editing in one text editor (not sure what its native encoding format is)… and sent the file to me over iChat (which could have done something to it), and then I edited it to include some placeholder text in yet another app. Substituted with (c) as you suggested and the user who reported the issue tried it out in 10.4.10 with Safari 2.x and all is well now :slight_smile:

Thanks!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options