Forum Moderators: open

Message Too Old, No Replies

javascript problem Macs

my ja animated buttons disapper on Macs IE and doesn't work in Safari

         

trifi

8:34 pm on Nov 24, 2003 (gmt 0)

10+ Year Member



I designed a site using 3 frames and wanted to show my capablities with js, from animations,pop-ups, divs,etc. The site works on IE and Netscape for Windows but not for MAC(also safari). I can't seem to figure out the problem, the buttons animate down and load the correct page but then the bottom TD containing a button disappears. The site URL is <sorry, no URLs>.

I think it might have something to do with setTimeOut because another page I am designing <edit> also has similar problems. This page is in test version so it is very simple. TriFi is more complicated with many scripts for the three frames.

I also set variable when each frame loads to control the animations and javascript functions. Could this be a problem? Appreciate any help or suggestions.

thanks,
Keith
-

[edited by: tedster at 4:35 am (utc) on Nov. 25, 2003]

tedster

9:16 pm on Nov 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you know your code is valid, (first step, always, is validate) then discovering exactly where the browser bug or non-support lies is a matter of removing bits at a time until you can isolate the behavior.

I've run into vanishing portions of pages when I float an element, but the floated element actually extends further down the page than it's containing element. It's not "supposed to" happen, but it does in Mac IE AND in some recent windows versions as well.

Yidaki

9:34 pm on Nov 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are huge differences between JavaScript on IE and Netscape on Win and between IE on Mac, Netscape on Mac, Safari on Mac, and on and on and on ... it's a science, an art to make js work on both platforms and all browsers.

My suggestion: get a good js debugger on windows, use the ns build in debugger on mac. Step through the processes and look for differences between the plaforms' function handling. Often it's just the different handling of objects (keyword: dom) and ms' strict ignorance of any standards.

It's all about debugging and testing. If you are nor sure about a special object handling / referencing, type the exact javascript command into google's search box. You'll (hopefully) find a answer at one of the expert's forums. Or post the problem JavaScript code snippet here.

For me it always ends in having two versions of the scripts and a browser check to load the appropriate version.

trifi

10:44 pm on Nov 25, 2003 (gmt 0)

10+ Year Member



thank you for the immediate response. I just got a mac for testing so I will be able to fully debug now. I think its probably an error that I missed sniffing the code when I try to align my absolute divs with an image in the document or find my cursor position for a mouseOut. I wanted to get anyone's opinion on using--- if (document.all)----- as a browser sorter(ex. IE and Opera) or do you not recomment this.

BjarneDM

11:35 pm on Nov 25, 2003 (gmt 0)

10+ Year Member



There's a lot of discussion as to whether to use browsersniffing or not. And if you use it, then how to implement it.

My advise is to avoid it if possible. IE *is* capable of handling most of the w3c DOM correctly in js - ie. use document.getElementBy... in your scripts instead of the IE specific document.all.

trifi

11:53 pm on Nov 25, 2003 (gmt 0)

10+ Year Member



I actually meant to use if(document.all)"DO THIS" as a sorter, sorry about being unclear. my reasoning was because I know opera and IE and some other browsers use this and I wouldn't have to say if (IE ¦¦ OP6, OP7, OP8 ¦¦.......)"DO THIS"