View Full Version : javascript functions on a mac

07-18-2005, 03:24 PM

I have recently used some javascript functions for a clock and another link which sets the page to a homepage. They work fine in internet explorer and mozilla on a pc, however on a mac in internet explorer 5.1 they don't work. The link is not working and the clock needs a magnifying glass to be seen.

Can anyone help?

07-18-2005, 03:42 PM

07-19-2005, 08:40 AM
Script: add home

I was wondering if anyone knew if this script should work on internet explorer 5.1 on a Macintosh computer. I have tried, but it doesn't work.

Should I be adding something else or using a different code?

I would appreciate any help, Thanks.

07-19-2005, 07:41 PM
The script uses a feature called 'behaviors' to manipulate the home page. This was never implemented for the Mac platform so no, the script won't work.


07-21-2005, 08:14 AM
Is there any script which would work on both platforms?

07-21-2005, 11:04 AM
There may or may not be an alternate method to bookmark the site in IE5 Mac but, that shouldn't stop us from trying to get the clock to display properly or at least bigger on that browser. Also, the code for the bookmark, at the very least, could be disabled for IE Mac preventing the link for it from appearing in that browser and from causing any error/interfering with the other script. To undertake this we still need a link to your page and a link to the clock script demo.

07-22-2005, 09:47 AM

Above is the link to a preview I have set up for a client.


This is the link to the liveclock script.

Really appreciate your help!


07-22-2005, 06:46 PM
I took a look at your page in IE5.01 sp2 for the PC hoping that some of the IE Mac problems would show up. No such luck. Here is a way to block javascript code from IE Mac though:

var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf('mac')==-1||agt.indexOf("msie")==-1){
Your code that IE Mac doesn't like goes here
else {
Alternative for IE Mac goes here
}Depending upon the situation, you can just leave the red part off if there is nothing you want IE Mac to do. If it is inside of a function and you want IE Mac to stop executing at that point put:


I'm not sure how to fix the clock but, using style perhaps. If you can get it looking good in IE Mac using style then you can use the comment hack to show all other browsers a style that works for them:

<style type="text/css">

.clock {
style for clock in IE Mac goes here

/* begin hiding from IE Mac\*/

.clock {
style for clock in all other browsers here

/* end hiding */
</style>Hopefully you know enough about css style to see what this will afford you. '.clock' is a class name we can apply to the element containing the clock to get its dimensions, font size, margins, etc. different for IE Mac than other browsers:

<div class="clock">here is where the clock appears</div>