Forum Moderators: open

Message Too Old, No Replies

Script not working on Mac. Can anyone help?

         

stephen follows

8:54 pm on Jan 11, 2005 (gmt 0)

10+ Year Member



Hi everyone,

I've recently finished a site using a lot of Javascript (to save loading the same images on pageloads).

The site is www.intenseproductions.co.uk

The problem is I've just been told it doesn't work on Macs.
Can anyone help?
Why is this happening?
Does it work on your Mac?

Many thanks,

Stephen

lZakl

11:46 pm on Jan 11, 2005 (gmt 0)

10+ Year Member



I am pretty sure that the TOS say not to use URL's in the message, just so you know. However, I was able to go to your site (I am sure it will be removed shortley), and I could view it and navigate the menu just fine. The problem with your Mac users is that they are using IE. Note to you as webmaster: Microsoft no longer has plans for the Macintosh compatible IE. If they were using the most current Firefox, or Safari (Which I have checked and they both worked), they would be able to view it.

I might suggest however, trying a script that supports older browsers. I usually try to support even IE 3.0 if possible. Another option, if you want a site that is that dynamic, is a Flash (SWF). If the file size were small enough, it would gaurantee being displayed as intended (considering the end user has the plugins installed).

Hope this helps ;0)

I used a Apple Powermac G5 Dual 2 Ghz using:

IE) Did not display as intended
FIrefox) Displayed as intended
Safari) Displayed as intended

BjarneDM

2:47 am on Jan 12, 2005 (gmt 0)

10+ Year Member



I've tried you site in Mozilla 1.7.5 and Safari 1.2.4 (v125.12) under Mac OS X 10.3.7. The only peculiarity that I observed is that if you click repeatedly on a subject, the content switches on and off.

As to IE on Mac, at the time IE Mac was released it had the best w3c css support. In some ways it's still better than IE 6 Win. But as M$ has stated that IE Mac is no longer developed, and Apple has released Safari, it's my impression that the number of people still using IE Mac under Mac OS X is steadily dwindling. Even though I'm a Mac-head I no longer specifically develop for IE Mac and Mac OS 9. I consider both to be dead, and the people using them usually knows they are using sub-standard/old technologies. On the systems I support that are still running OS 9 I've installed wamcom Mozilla.

Generally: If you can get your pages to display correctly in Mozilla/Firefox, IE 5.5, IE 6, and Opera on a WinTel machine, your pages ought to work correctly on any combination of OS and browser.

stephen follows

9:28 am on Jan 12, 2005 (gmt 0)

10+ Year Member



lZakl, thanks for checking. (And thanks for letting me know about the TOS - know better now).

BjarneDM, thanks for checking also (and I'm aware that due to the way I've coded it that the content is switched off when doubled clicked - I've been trying to fix for a bit but it's proving so much tricker tahn it should!)

I think I know the answer to this but... is there any quick fixes to get IE on the Mac to view it?

(If anyone wants to help sort the doubled clikcing problem that would be nice :-) )

BjarneDM

11:47 am on Jan 12, 2005 (gmt 0)

10+ Year Member



stephen_follows
(If anyone wants to help sort the doubled clikcing problem that would be nice :-) )

You are missing a state-variable that keeps track of which part of the content you are showing. Basically, your whole expand/contract functionality is badly coded. Get rid of everything related to ccollect and expandcontent.

If you don't need IE4 support you don't need to use document.all. IE5 and up supports document.getElementById

var previous = "sc2" // any except the one in onload

function expandcontent(cid){
if (previous!= cid){
document.getElementById(previous).style.display="none";
document.getElementById(cid).style.display="block";
previous = cid;
}
}

All of those functions at the start can be collapsed into a single function call. And set a name for the pop-up window because as it is now you can open them again and again instaed of just bringing a previously opened window to the front.

href='javascript:showWindow("url",width,height)'

function showWindow(showURL,widht,height){
var showName = showURL.split("/");
showName = showName[showName.length-1].split(".");
showName = showName[0];
window.open( showURL , showName , 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=' + width + ',height=' + height + ',left=0,top=0');
}

And why put that ".switchcontent{display:none;}" inside a document.write? I can see no reason for that unless you need to support IE4 and NN4

And another problem not related to this is that your whole html coding reeks of bad practise with tables within tables - brrrrr ;)

BjarneDM

11:51 am on Jan 12, 2005 (gmt 0)

10+ Year Member



stephen_follows
(to save loading the same images on pageloads).

Images generally don't get reloaded on pageloads if they already are in the browsercache. The browser asks the server for them stating a timestamp and then gets told there's no change; thus the browser generally jus re-uses the image in the browser cache

stephen follows

12:30 pm on Jan 12, 2005 (gmt 0)

10+ Year Member



Thanks for the help.

Re: tables within tables -> lazy use of Dreamweaver
*hangs head in shame*

At the end of the day I'm rusty with the coding side. I knew the Javascript was messy, I just wish I had the time and knowledge to do it properly. I don't think I really written 'attractive' coding since being a kid on Basic! But, I can dream....