homepage Welcome to WebmasterWorld Guest from 107.20.109.52
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Browsers / Firefox Browser Usage and Support
Forum Library, Charter, Moderators: incrediBILL

Firefox Browser Usage and Support Forum

    
Firefox - javascript menu compatibility nightmare
Redesign half dozen menus for FF compatibility?
walrus




msg:1589491
 5:44 pm on Dec 20, 2005 (gmt 0)

I've recently noticed that most of my clients java menus do not work properly in FF. Are we going to see more of the " This website best viewed with IE5 or later" , or are a lot of designers having to go through redesigning menus becasue FF doesnt seem to be as java compatible as it could?
I've been telling my clients its still a new browser and these were done before it was popular.
Any feedback or advice would be greatly appreciated.

 

pageoneresults




msg:1589492
 5:52 pm on Dec 20, 2005 (gmt 0)

I've recently noticed that most of my clients java menus do not work properly in FF.

Is it the JavaScript or is it the html that is causing issues? It is most likely the html that will need to be brought up to standards for it to display properly. And then, there are a certain percentage of those JavaScript menus that only work in IE.

kaled




msg:1589493
 6:23 pm on Dec 20, 2005 (gmt 0)

Assuming the html validates, one of the commonest javascript compatibility issues seems to be not using document.getElementById because you can get away without it in IE - but it's usually an easy fix.

Kaled.

walrus




msg:1589494
 6:42 pm on Dec 20, 2005 (gmt 0)

Thanks for the advice, guess i'll have to check the html for validation and try again.

Took a quick look at 2 scripts both have the get elementbyid attribute but only one has this...

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

Is there a snippet i could add that instucts for FF?

Don_Hoagie




msg:1589495
 8:26 pm on Dec 20, 2005 (gmt 0)

Aside from the aforementioned good suggestions...

Did you check their FF versions? In my mind, Firefox is startlingly bad(or just extremely strict; I'm not enough of an expert on JS to know which) with Javascript... I've had quite a few JS menus and other functions that work in EVERY SINGLE browser besides FF... but with the recent release of 1.5, I've noticed that many of those issues have gone away (which is what leads me to believe that FF is bad with JS, rather than righteously strict).

Now obviously you still have to account for the many people who use older versions... but I would check out your problem scripts in the FF 1.5 release: if they work fine, then you simply have a moral dilemma over whether or not you should to make changes to accommodate outdated browsers.

walrus




msg:1589496
 11:20 pm on Dec 20, 2005 (gmt 0)

Thanks Don, I've got version1 with all the updates.
Guess i have to uninstall then download the new one.
I also found so many validation errors that i'll be busy for a while anyways.
Thanks!

kaled




msg:1589497
 11:59 pm on Dec 20, 2005 (gmt 0)

You should also validate the CSS. For instance IE accepts '=' instead of ':' - I discovered that the hard way!

Kaled.

Purple Martin




msg:1589498
 1:02 am on Dec 21, 2005 (gmt 0)

Two more hints that are always relevant to this sort of thing:

Remember to provide alternative navigation for those users who have JavaScript switched off. This will help many people using all different kinds of browser.

It's easier to develop using FireFox as your test browser and then debug for IE, rather than do it the other way round. This is because FireFox complies more closely with the standards.

walrus




msg:1589499
 2:50 am on Dec 23, 2005 (gmt 0)

You should also validate the CSS. For instance IE accepts '=' instead of ':' - I discovered that the hard way!

Thanks, a bit embarrasing I guess, never even occured to me the css and the html both need to validate. Ive somewhat hacked my way through coding html.

It's easier to develop using FireFox as your test browser and then debug for IE, rather than do it the other way round. This is because FireFox complies more closely with the standards.

Thanks, I'll be trying that.

Kaled,did you mean i might try something like this?

var FF1.0=document.getElementById&&!document.all
var FF1.5=document.getElementById&&!document.all

kaled




msg:1589500
 3:17 am on Dec 23, 2005 (gmt 0)

I use document.getElementById() exclusively. Having said that, I don't test on ancient browsers so if you're required to support IE 4, for instance, then you'll need to verify compatibility.

If necessary, create a function thus

function getElement(id)
{ if (document.getElementById) return document.getElementById(id)
else return eval('document.all.' + id)
}

I think that's how it should work but, as I said, I don't use document.all

Kaled.

walrus




msg:1589501
 3:57 am on Dec 23, 2005 (gmt 0)

Thanks Kaled, I wish i could afford the time to learn javascript, just amazes me all the different things you can do with it. I hack my way through edititng it a bit but it must fell great to be able to compile menus,games, etc.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Browsers / Firefox Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved