Browser Compatibility!!
Can anyone help me out with this problem I have.....
I'm designing a website for a rather large company and I'm almost done. It works beautifully on both Netscape and Internet Explorer browsers. However I was asked to make it work in Mozilla as well. It seems that I only have a problem with my drop down menu.
Hopefully someone can help me out with this. If more info is needed I'll supply it. I'll also put the latest version of the site online at http://www.htowndesigns.com/FMF/
Thanks!!
-Jeremy
Abhishek Reddy posted this at 23:12 — 23rd August 2003.
He has: 3,348 posts
Joined: Jul 2001
First guess: you're using IE-specific DOM. That is document.all.Home... What you want for Moz is document.getElementById("Home")...
So change
function start() {
document.all.Home.style.height='29px';
document.all.Brokers.style.height='29px';
// etc
}
to
<?php
function start() {
document.getElementById(\"Home\").style.height='29px';
document.getElementById(\"Brokers\").style.height='29px';
// etc
}
?>
and
function bigBrokers(lyr) {
document.all[lyr].style.height='145px'; }
to
<?php
function bigBrokers(lyr) {
document.getElementById(lyr).style.height='145px'; }
?>
and so on.
I can't recall how well getElementById is supported by IE, so you may have to add a browser check and use both methods. Try this anyway...
htowndesigns posted this at 23:15 — 24th August 2003.
They have: 2 posts
Joined: Aug 2003
Abhishek Reddy thanks for your help!! I'll give this a shot and see how it works in IE. If that doesn't work I'll just throw in a page that checks what browser they're using and then redirects them. Thanks again!!
Renegade posted this at 05:41 — 25th August 2003.
He has: 3,022 posts
Joined: Oct 2002
It works pretty well in IE
Suzanne posted this at 06:10 — 25th August 2003.
She has: 5,507 posts
Joined: Feb 2000
Well that's to be expected, eh Renegade, since Mozilla is not IE?
Renegade posted this at 06:51 — 25th August 2003.
He has: 3,022 posts
Joined: Oct 2002
no, I'm talking the GetElementByID thing, it works pretty well in IE
Suzanne posted this at 07:13 — 25th August 2003.
She has: 5,507 posts
Joined: Feb 2000
Ah! That makes more sense! *doh!*
Abhishek Reddy posted this at 07:15 — 25th August 2003.
He has: 3,348 posts
Joined: Jul 2001
I've tested a copy of your page with the changes I proposed and it seems to work just fine in Mozilla Firebird, IE6 and IE5.
btw, afaik, getElementById() is not as well supported in IE. I tend to work with it on a practical basis -- try it, if it works, go with it; nevermind any other rules of thumb.
edit:
It's IE4 that wholly doesn't support getElementById, then.
edit 2:
According to this reference, Explorers 5 and 6 have a "Slight bug" with gEBId.
m3rajk posted this at 16:20 — 25th August 2003.
They have: 461 posts
Joined: Jul 2003
umm... people still use ie4? if you're under 5.5 it tells you you need to dl 5.5 or 6 to use windows update.
also, which netscape? 4.xx has end of life
6.x is not on the mozilla engine but gecko and had all sorts of quirks that...
7.x has the mozilla engine.. that's right. driven fromt eh same thing as mozilla, only morphed by aol in ways i don't care for, so they generally react the same way. firebird is a dev version. i have 1.31 to test how people see it (and it's what i use whenon the linux box i have)
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
Abhishek Reddy posted this at 20:12 — 25th August 2003.
He has: 3,348 posts
Joined: Jul 2001
Some old boxes still have IE4. Netscape 4 is a little more popular. Either way, no point coding for them. I was merely pointing out that gEBId functionality is not necessarily complete in IEx -- must find specifics on that.
The Gecko/Moz engine may be essentially the same, but Netscape has a higher tolerance for MS and non-standard code, such as document.all, so testing on NS is not a good idea -- better to test with a "pure" Gecko/Moz first.
m3rajk posted this at 16:47 — 26th August 2003.
They have: 461 posts
Joined: Jul 2003
i thought there was some issues with gecko so they went back to the mozilla engine that is used by mozilla. i know they changed or had a major changein the engine between 6.x and 7.x so they will behave differntly
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.