By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,820 Members | 957 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,820 IT Pros & Developers. It's quick & easy.

Code not working in Firefox and Opera

Atli
Expert 5K+
P: 5,058
Hi.

I've created this little window that is shown when I roll the mouse over elements I specify in my html code.

Like a nubbin I test this in IE while I'me writing it, thinking it can hardly be that hard to modify for the other browsers when I'm done.

Now it works perfectly in IE but no matter what I do I can not make it work for Firefox or Opera.

Please, can anybody tell me what those !#"#$%%) browsers arn't understanding? :P

This is what I think is causing the problem.
Full code is here

Expand|Select|Wrap|Line Numbers
  1. ToolTip.prototype.Update = function()
  2. {
  3.     // Get mouse position
  4.     if (browser == "MSIE") {
  5.         // Internet Explorer (Also works for Opera)
  6.         MouseX = window.event.x+document.body.scrollLeft;
  7.         MouseY = window.event.y+document.body.scrollTop;
  8.         Width = document.body.clientWidth+document.body.scrollLeft;
  9.         Height = document.body.clientHeight+document.body.scrollTop;
  10.  
  11.     } else {
  12.         // Netscape, (Firefox, Opera, ...)
  13.         MouseX = e.pageX;
  14.         MouseY = e.pageY;
  15.         Width = window.innerWidth+window.pageXOffset;
  16.         Height = window.innerHeight+window.pageYOffset;
  17.     }
  18.  
  19.     // Get element
  20.     var element = $(ToolTip.elem);
  21.  
  22.     element.style.visibility = "visible";
  23.     element.style.width = ToolTip.Width;
  24.     element.style.backgroundColor = ToolTip.backgroundColor;
  25.     element.style.border = "solid 2px "+ ToolTip.borderColor;
  26.     element.style.padding = "3px";
  27.     element.innerHTML = ToolTip.Text;
  28.     element.style.left = MouseX + 10;//(MouseX - parseInt(elemt.style.width.replace("px")));
  29.     element.style.top = MouseY;
  30. }
  31.  
[HTML]<!--
Panel that opens the ToolTip
-->
<div
id="mydiv"
onmouseover="javascript:ToolTip.Show('What?');"
onmouseout="javascript:ToolTip.Hide();"
style="
position: absolute;
left: 150px;
top: 50px;
width:200px;
height:200px;
background-color:#000000;"
></div>
<!--
ToolTip panel
-->
<div
id="fdiv"
style="
visibility: visible;
position: absolute;
left: 300px;
top: 300px;
width:100px;
background-color:#555555;
border: solid 2px red;"
></div>[/HTML]
Feb 1 '07 #1
Share this Question
Share on Google+
25 Replies

100+
P: 428
ToolTip.prototype.Update = function()
should have the reference to the event parameter you use later.

MouseX = e.pageX;
MouseY = e.pageY;

IE doesn't use it, it uses a global event-
but include it for the clients that pass an event parameter:
ToolTip.prototype.Update = function(e)
Feb 1 '07 #2

Atli
Expert 5K+
P: 5,058
Ahh ofc thank you.

All this trouble cuz of a single e :P
Feb 1 '07 #3

acoder
Expert Mod 15k+
P: 16,027
Like a nubbin I test this in IE while I'me writing it, thinking it can hardly be that hard to modify for the other browsers when I'm done.

Now it works perfectly in IE but no matter what I do I can not make it work for Firefox or Opera.

Please, can anybody tell me what those !#"#$%%) browsers arn't understanding? :P
That's the wrong way round. Test on a standards-supporting browser (pretty much any modern browser, but IE), then test on IE. IE is buggy and still fails to support standards properly.
Feb 1 '07 #4

Atli
Expert 5K+
P: 5,058
I'm not sure why ppl keep complaining about IE.

In my experience, IE is the one browser I've never had to re-write code for. But almost everytime I write a page I'm spending most of my time re-writing code for Firefox or Opera, depending on which one I use to test the original code.
99% of the time, if it works in either of them, it works in IE.

Also, IE has some nice features that no other browser is bothering to make.
The scrollbar-color styles for example.
And the smooth new look of all text in IE7.

In any case, if you want your code to work in any browser, do you want it to be IE, used by ~86% of the market, or any of the other 14%?

Btw. sry about the rant. All the MS haters out there are just really starting to annoy me, not that I'm saying your a MS hater, acoder :P
Feb 4 '07 #5

acoder
Expert Mod 15k+
P: 16,027
Ok, have a good read on this topic. Plus some (many) IE7 bugs.
Feb 5 '07 #6

Atli
Expert 5K+
P: 5,058
Nice articles.

The first one had some usefull info.
Tho it looked like most of the problems it describes have been fixed in IE7.
O and omg! It's like the author went out of his way to created this page not to work with IE, and he did a good job!

The second one I liked a bit more.
Tho some of the bugs he demonstrated did really "work" when I tested them.
Im assuming that is because the author uses the Standalon version on Windows XP to spot them, I tried them using both IE7 on XP and IE7 on Vista.

Articles like these wont ever surprise me. I'm well aware that IE is buggy, but like the bullseye on Windows' back in security matters, the ammount of bugs and annoyance at IE is perhaps not because it is any more buggy than other browsers, but rather because there are alot more users to spot them.

Btw. Is it true that IE on Vista uses a new rendering engine, not the "dinosour" that has stayed with us since the browser wars?
Feb 5 '07 #7

acoder
Expert Mod 15k+
P: 16,027
One of the main problems with IE is the amount of time taken to release patches when vulnerabilities are discovered. That is the reason why IE6 was simply not secure. Other browsers released patches almost immediately. That's for security, and if you're talking about bugs in rendering, DOM support, etc., you can forget it.

IE7 is a major improvement, but Microsoft really need to speed up bug fixes, patches, etc. otherwise we have the same problem. Btw, it is still based on Trident, but with improvements. See here unless you're talking about Spyglass (IE7 is the first IE not be based on Spyglass technologies).
Feb 5 '07 #8

Atli
Expert 5K+
P: 5,058
Yea, I won't argue with that.
My theory is that Bill Gates demands to read every line of code before it is released :P
Feb 5 '07 #9

100+
P: 143
Yea, I won't argue with that.
My theory is that Bill Gates demands to read every line of code before it is released :P
It's quite clear that you have absolutely no clue in regards to the Internet or the world wide web.

The "MS haters" out there, hate for a good reason. There's a group called the W3C that set the standards for the HTML specification and most of the browsers tend to try and follow this standard as closely as possible. Of course, there are some annoying quirks and differences, but worst of all, is InternetExplorer. Not only does it fail to follow standards, they even create their own. They agree to follow standards, yet don't implement them for more than 5 years. A great example is something as simple as PNG image support, which wasn't introduced until IE 7!!

http://www.w3.org/Graphics/PNG/

The PNG specification was first issued as a W3C Recommendation on 1st October, 1996
There's a good reason that InternetExplorer is starting to lose it's monopoly of a markey share and that's because there are better alternatives out there, which display code more like it's supposed to be displayed and are also updated on a more frequent basis, making them safer from a security aspect and also more up to date.


Like you were already told - if you wish to create half decent web applications, code for standards compliant and modern browsers first, then tweak to get your code working with IE afterwards.
Feb 6 '07 #10

Atli
Expert 5K+
P: 5,058
It's quite clear that you have absolutely no clue in regards to the Internet or the world wide web.
.
No need to start throwing **** around because sombody has an opinion you don't like. Argue your point if you must, but please lay of the personal insults.
For the record I have spent years studiyng this sort of thing both at school and by myself and I do have a lot of experience.

And just to clarify, PNG images were supported in earlier versions of IE, what they added in IE7 was the PNG alpha (transparency) support.

And as I said before. I do test my applications in Firefox/Opera, mostly because I rarely have to change them to make them work in IE. Wich is almost always the case when I try it the other way arround.
Wheter that is a good or a bad thing, is a matter of opinion.
Feb 6 '07 #11

acoder
Expert Mod 15k+
P: 16,027
No need to start throwing **** around because sombody has an opinion you don't like. Argue your point if you must, but please lay of the personal insults.
For the record I have spent years studiyng this sort of thing both at school and by myself and I do have a lot of experience.
Now, now, we don't want a slanging match and that means everyone. Perhaps it was insulting and a bit strong and must be avoided in future. This is a community and we want to promote harmony. Developers working with each other to solve problems, not throwing our toys out of the pram! I hope both of you make up (Steven apologising for offence caused [whether inadvertently], Atli accepting apology). In future, a measured response is more appropriate and language must be controlled.

And just to clarify, PNG images were supported in earlier versions of IE, what they added in IE7 was the PNG alpha (transparency) support.
To be fair, I think that's what he meant.

And as I said before. I do test my applications in Firefox/Opera, mostly because I rarely have to change them to make them work in IE. Wich is almost always the case when I try it the other way arround.
Wheter that is a good or a bad thing, is a matter of opinion.
We'll leave it at that, shall we? My own personal opinion (as you know) is that you should test in Firefox/Opera/<insert your own standards-supporting browser here> then test in IE, though IE7 is a big improvement. You may have been lucky, but if you've done any CSS, IE6 (don't even mention IE5) was a big headache!
Feb 6 '07 #12

P: 3
We'll leave it at that, shall we? My own personal opinion (as you know) is that you should test in Firefox/Opera/<insert your own standards-supporting browser here> then test in IE, though IE7 is a big improvement. You may have been lucky, but if you've done any CSS, IE6 (don't even mention IE5) was a big headache!
I keep hearing this, and in practice it is just bad advice. Why on earth would you test in a browser used by less than 10% of you user base first? Who cares if it looks great in FireFox if your user base is using IE? That is the equivalent of getting your desktop application to work in Linux first and then trying to port it to Windows for the 90% of your users. Get it working in IE, then worry about the 10% (being generous here) that are using another browser.

I used to try the approach of getting it working in FireFox (which also has its share of bugs, but prior to IE7 had much better standards support) and after listening to my clients complain that it didn't look right in IE6 over and over again abandoned the practice and started getting the site to work in IE first and then worrying about the other browsers. I've also found that with a few exceptions if it works in IE, it will work on other browsers.

Look at your target user base and cater to that platform first (whether it be IE or another browser). This way you will make your deadlines and may add the additional browsers if you have time or in another release.
Mar 24 '07 #13

drhowarddrfine
Expert 5K+
P: 7,435
The reason you code and initially test in Firefox or Opera first is because they are the most standards compliant browsers out there. This is why the previous poster noted that writing code for them almost always works in IE,also but writing code for IE frequently doesn't work in Firefox or Opera. So you aren't coding to Firefox or Opera. You are coding to web standards.

IE7 is nine years behind web standards, old, buggy and doesn't support modern features such as xhtml, svg, proper DOM support and I could go on. Writing code to IE almost guarantees it won't work in other modern browsers while writing code to standards compliant browsers almost assures it working with IE with tweaks. That's why there are hundreds of web sites dedicated to hacks for IE while you will find none for opera or Firefox.

Current world wide web usage of Firefox alone is 16% and growing. In Europe, it's between 20% and 40%. So at least two of every 10 viewers of your page do not use IE.
Mar 24 '07 #14

P: 3
The reason you code and initially test in Firefox or Opera first is because they are the most standards compliant browsers out there. This is why the previous poster noted that writing code for them almost always works in IE,also but writing code for IE frequently doesn't work in Firefox or Opera. So you aren't coding to Firefox or Opera. You are coding to web standards..
You are misquoting your poster. He was the original poster, and actually said that what he writes for IE usually DOES work with other browsers where it does not work the other way around.

Also, regardless you are coding to the browser. Example: I just recently implemented a ASP .Net page that implemented drag/drop functionality using client side javascript. As it turns out, FireFox does not allow the style.left and style.top variables to be modified when the doctype is set to XHTML 1.0 Transitional (the default on most ASP .Net pages). I have not been able to find anything in the published standard that specifies that this is not allowed and it IE7, IE6 and Opera all allow the use of the style.left and style.top properties. FireFox handles it fine when the doctype is not specified. I had to work around the issue by setting the style.cssText property directly (which works in IE6, IE7 and FireFox). You can't assume that any browser will support a given implementation according to the standard (although FireFox is by far the one that best meets the standards).

IE7 is nine years behind web standards, old, buggy and doesn't support modern features such as xhtml, svg, proper DOM support and I could go on. Writing code to IE almost guarantees it won't work in other modern browsers while writing code to standards compliant browsers almost assures it working with IE with tweaks. That's why there are hundreds of web sites dedicated to hacks for IE while you will find none for opera or Firefox.
Okay, I assume that you are talking about IE6 since IE7 isn't that old. Reality is it takes more than tweaks to move your page from FireFox to IE6. It is IE's lack of support that makes it the lowest common demonitor. Writing the site to FireFox almost always results in using features that aren't available in IE. Sometimes you just can't do it the same way in IE (although I haven't had these issues in IE7 - yet). Example: One of my developers added dynamic tabs to a site. To actually implement the tabs he used an unordered list with the appropriate styling to make it horizontal with the appropriate tab images behind each list item. This looked great with FireFox (and even IE7), but in IE6 we just couldn't hide a border underneath the selected tab. We spent 16 hours trying to get this to work with CSS before finally giving up and switching all the code that used the unordered lists to use tables instead (which worked in all browsers). In the end 32 hours were wasted. The client didn't care that IE6 was the only browser that showed the defect and cared less that IE showed the defect because it didn't support CSS properly.

There are a number of other examples, including the example that started this thread, where code for the other browsers just won't work in IE. It takes time and money to figure out why the code that works perfectly in FireFox does not work at all in IE, and it takes no more time to port the page from IE to FireFox. Ultimately it comes down to the best use of resources, serving the most users in the same amount of time.

I started out the same way you are pitching, implementing the site for FireFox first and then converting to IE6. In the end, it just cost me too much time and the clients simply put more priority on IE6 as that would serve the most users.

Current world wide web usage of Firefox alone is 16% and growing. In Europe, it's between 20% and 40%. So at least two of every 10 viewers of your page do not use IE
You have just proven my point, although I would like to know what you source is for 16% worldwide usage. Last Neilsen and PC Magazine numbers ahd FireFox at around 6% worldwide with around 9% using other browsers in general, but I haven't found a source for Europe specifically.

However, if your are going to release your site, are you going to get the site out and serve the 8 users, then make the changes to bring on the other 2, or are you going to release the site for the 2 users and bring the other 8 on later. It doesn't take a genious to see which makes the most business sense.

Given enough time, its best to get the site to work with all browsers, but if you're pressed for time (and you will be), my personal experience has been that it is better to do it for IE6 first. Hopefully at some point IE will have enough standards compliance where it is a non-issue or the tide of browser users will switch to FireFox, but I'm not holding my breath.
Mar 24 '07 #15

drhowarddrfine
Expert 5K+
P: 7,435
regardless you are coding to the browser.
Not at all. You code to the W3C standard and check it in the most standards compliant browser you can get; in this case, it's FF and Opera or you could use Amaya. Like you said:
FireFox is by far the one that best meets the standards
Which is the point. If you want to write standard code, you can't be checking in the least standard browser, specifically, any version of IE.
I assume that you are talking about IE6 since IE7 isn't that old.
IE7 is nine years behind web standards. [quote]Sometimes you just can't do it the same way in IE. Writing the site to FireFox almost always results in using features that aren't available in IE.[\quote]For the just mentioned reason.
(although I haven't had these issues in IE7 - yet).
Perhaps because IE7 is better than IE6 but that's not saying much.[quote]One of my developers added dynamic tabs to a site. [\quote]And you are now noticing just how bad a browser IE6 is because you see that your standards compliant code worked in Firefox and IE7 but didn't in IE6. This is my point. Do initial testing in Firefox or Opera and then adjust for IEs quirks and bugs.
It takes time and money to figure out why the code that works perfectly in FireFox does not work at all in IE, and it takes no more time to port the page from IE to FireFox.
That's the first time I've ever heard that. The problem is always code that works in IE has to be adjusted for Firefox, then Opera, then Safari, then etc. while code tested in Firefox/Opera/etc. only needs one adjustment for IE.

Hacks for getting IE to work correctly are known and long standing. There are several important sites, such as positioniseverything.net and webdevout.com, that document how to fix IE and what works in different browsers. I assume you are also familiar with "haslayout" issue with IE?
It doesn't take a genious to see which makes the most business sense.
Have you been hearing about all the sites that had to be fixed when IE7 came out? If they were coded to Firefox, such adjustments would not be necessary. If you test to Firefox/Opera, you know it probably works in all browsers, maybe even IE but probably with tweaks.

Again, you are talking about coding to browsers and I am not. I am saying use a better browser to test for standards compliance. Make sure you wrote proper code. If it doesn't work in IE then that is IEs fault and not yours. The adjustments you might have to make are known and documented.
Hopefully at some point IE will have enough standards compliance where it is a non-issue or the tide of browser users will switch to FireFox, but I'm not holding my breath.
I wouldn't. Chris Wilson, lead developer for IE, told me a few weeks ago that he won't tell what their roadmap is for the future of IE. In his call for suggestions for the new IE8, his emphasis is on RSS support with no mention of better compliance. If the web is going to use the features available to it, IE needs to get better or go away.

I made a mistake. Firefox is 16% in the US and 13% world wide. Here is the source reported in all the magazines.
Mar 24 '07 #16

iam_clint
Expert 100+
P: 1,208
i'm with atli though i don't like how w3c standards aren't Clear and Concise and that it can be interpreted different Personally i would choose IE over Firefox or netscape or opera any of them..... I write several thousands of lines of code a week to only have to go back and fix it for Firefox due to incompatabilities such as onscroll and the list goes on and on.
Mar 24 '07 #17

drhowarddrfine
Expert 5K+
P: 7,435
I don't know what you are specifically talking about but this is the web developers mantra: "If it works in IE but not Firefox then something is wrong." I think what you might be doing is trying to get code that IE misuses to work in Firefox/Opera or whatever which is performing correctly. I rarely find the opposite to be true.

Also, "choosing IE" means you are coding to a browser and not to the standard. There is a published standard which all vendors look to, including Microsoft.

If every other browser interprets the W3C standards correctly but IE does not, there is hardly a problem with being clear and concise. After all, all the browser vendors, including Microsoft, are members of the W3C. It is only IE that apologizes for it's inability to correctly interpret the standards. As Chris Wilson said, "We have a lot of work to do to catch up." And you see some of those changes as IE7 now works more like Firefox/Opera than before.
Mar 24 '07 #18

P: 3
And you are now noticing just how bad a browser IE6 is because you see that your standards compliant code worked in Firefox and IE7 but didn't in IE6. This is my point. Do initial testing in Firefox or Opera and then adjust for IEs quirks and bugs.That's the first time I've ever heard that. The problem is always code that works in IE has to be adjusted for Firefox, then Opera, then Safari, then etc. while code tested in Firefox/Opera/etc. only needs one adjustment for IE.
On the contrary, I've ALWAYS known that IE6 has horrible standards compliance, followed only by the Netscape browser in how lousy the standards compliance is. What I am saying is that the client and their customer could care less if the web site is following standards or not; they only care if it looks right in their browser. For the moment, this is still IE6 in most cases. You give the priority to what will satisfy the most customers. In the case above, I had to spend an additional 32 hours getting something to display properly for the 80% of the site users. If I had done it for IE originally I would have gotten it to work for the 80% of the customers starting out, and then if resources permitted delivered it to the FireFox users. In this instance, the solution would not have requred any changes to work in FireFox, but even if it had the time to address it is after the majority of the customer base is dealt with (the IE users). When I did a Mac user group site, I tested under Safari first before even looking at IE or FireFox simply because that is where the audience is.
Have you been hearing about all the sites that had to be fixed when IE7 came out? If they were coded to Firefox, such adjustments would not be necessary. If you test to Firefox/Opera, you know it, probably works in all browsers, maybe even IE but probably with tweaks.
But this just hasn't proven to be true, at least not in my own company. If the site had been done to standards compliance, it would not have looked correct in IE6; the browser used by most of the audience. This is especially true the more you use advanced CSS features in the site. Many of the more advanced CSS features just can't be replicated in IE (try overlapping divs in IE6). In the case of these IE6 specific sites, they obviously did not have time to test the site under FireFox and get it working there, which is unfortunate but is often the case. If they had done the site to standards compliance, they may have run out of resources before getting the site to work in IE, which would have been disastrous. They reached the largest audience with the resources (people and time) available. I've looked at dozens of books including Professional CSS Cascading Style Sheets for Web Design by Wrox publishing which document the workarounds required by IE6, Safari, IE for Mac, and others and in numerous cases the books settle for a less sophisticated appearance in IE6 because it doesn't support the standard. That may be fine for a book, but the reality is this doesn't cut it in the real world. The customer and the average person at home could care less about standards or if the site works in a browser other than their own.
Again, you are talking about coding to browsers and I am not. I am saying use a better browser to test for standards compliance. Make sure you wrote proper code. If it doesn't work in IE then that is IEs fault and not yours.
If your site does not deliver properly to the largest part of your audience, IT IS YOUR FAULT! Again lets keep a foot in reality here; the client, and obviously most of the web users out there, don't care that IE is crap. They only care that if it can be done, you had better do it. If it doesn't work in IE then you didn't write it properly for IE, regardless of the underlying reason. If you're a consultant, that probably means you're not going to get paid. I can't tell my client that its IE's fault that something doesn't look quite right if they can see other sites implementing the same thing. They and my replacement would have a great laugh over that one.

I've never heard of anyone hired to write a standards compliant site as the top priority. In my experience its deliver the content and functionality to as much of the target audience as possible with the available resources (preferably deliver content to everyone, but that isn't always possible with resource constraints). If my target audience is Mac users, I'd better make sure this site runs on Safari, if it is for the general web audience, it had better run properly under IE, and if its a Linux user group site, by all means make it standards compliant first because your major user base will be using FireFox and will love telling the IE users that it doesn't display properly in IE because IE isn't standards compliant.

Ultimately what it came down to in my company was that after tracking the time to convert standards compliant sites to work in IE6 and then later the time to convert IE6 sites to display in standards compliant browsers with similar sites, converting IE6 to run under standards compliant browsers come out requiring less effort almost every single time. I initially saw all the documentation that taught to write to the standards compliance first and then convert to IE, and so I started with that paradigm. It was after experiencing the issues with this approach and tracking the hours required for each methodology that I decided to code to IE6 when the site is for general audiences. We may not have coded the sites the way I might have prefered, and may have used structures that I know can be done cleaner with advanced CSS features, but in the end its about delivering to the largest target audience, not making your site standards compliant for the sake of standards compliance.

If I had the choice, I would make every site standards compliant, and give a link to IE users for where they could get FireFox or Opera. But then my company would go broke, and I would have to find a job working for someone else, and I've grown rather fond of being my own boss. Ultimately you have to make the tough choices on what you can do with the time and resources available.

Chris Wilson, lead developer for IE, told me a few weeks ago that he won't tell what their roadmap is for the future of IE. In his call for suggestions for the new IE8, his emphasis is on RSS support with no mention of better compliance. If the web is going to use the features available to it, IE needs to get better or go away.
Wouldn't that be nice? Maybe if we all send a few bucks to the "Send IE to Hell" fund we can bribe Microsoft to abandon the browser. :) I'll have to fool around with the name first and come up with a good acronym for it. Ultimately though, FireFox will need to step up with enterprise patch management functionality for its browser to function in a corporate environment though. Downloading the patches at the client isn't going to cut it in a corporate environment where you need to know that your users have the same updates any more than downloading from the Microsoft Windows Update site worked for Windows in the corporate environment.

I made a mistake. Firefox is 16% in the US and 13% world wide. Here is the source reported in all the magazines.
Thank you very much for the link, I appreciate it. It helps a lot to have the numbers when trying to justify effort to clients. Unfortunatley they still just aren't high enough. Based on the numbers, this suggests that there are fewer FireFox users outside of the US, but I'm sure there are pockets where it is more popular. The worldwide numbers might be distorted by how many languages FireFox is produced in.
Mar 24 '07 #19

drhowarddrfine
Expert 5K+
P: 7,435
Not to beat a dead horse but I'm trying to say that you should design for standards compliance and chances are your code will work in all browsers. Design for IE only and chances are it will only work in IE.
If the site had been done to standards compliance, it would not have looked correct in IE6; the browser used by most of the audience.
You are right and that is what conditional comments are for. Now that IE7 is taking off, are you having trouble with that browser? If you code to standards compliance, you would have the advantage of it working in all browsers. If IE had a problem, there are known and proven hacks or you can use conditional comments. These are easy things to do in most cases so I wonder if you are aware of them.
the reality is this doesn't cut it in the real world.
Well, it works for me in the real world every day.
The customer and the average person at home could care less about standards or if the site works in a browser other than their own.
Tell your customer that two out of every 10 customers can't view their site correctly or tell him that it will cost him to recode his page for IE7 because it has changed and see how much he cares.
I can't tell my client that its IE's fault that something doesn't look quite right if they can see other sites implementing the same thing.
I didn't say forget IE. I said write proper html code and fix it so it can work in IE. It's easy. I do it all the time.
I've never heard of anyone hired to write a standards compliant site as the top priority.
It is listed in some of my client written contracts as a requirement.
if it is for the general web audience, it had better run properly under IE
Again, you are assuming coding for different browsers requires a different form of html/css. I am only saying that if you code to standards your code will most likely run in all browsers just fine, even IE, though that is the browser that may require tweaks. The last site I did tested well in every browser with a slight width adjustment for IE6 and that was all we had to do. We didn't sit back and worry about it not working in Opera or Konqueror or Safari or even IE7 because we just knew it would be fine; and it was.
after tracking the time to convert standards compliant sites to work in IE6 and then later the time to convert IE6 sites to display in standards compliant browsers with similar sites
There is just something fundamentally wrong with how you approach this. We don't "convert" from one browser to another. Never have. We make a little tweak or IE hack here and there but we're talking about a few minutes. And these are complicated sites. So when someone says it took them 32 hours to not solve something I'm taken aback. It doesn't make sense to me.
FireFox will need to step up with enterprise patch management functionality for its browser to function in a corporate environment though.
Firefox is the preferred browser for IBM.
Unfortunatley they still just aren't high enough.
One site we take care of gets 300 orders daily. Late last year, there was an error we didn't catch but the client's son did. His son used Firefox. The client mentioned it in passing and said he didn't care but how many people use "that thing". I think I told him then around 10% and he blew a gasket. "Do you mean I'm missing out on 30 orders a day!!!"
Mar 25 '07 #20

acoder
Expert Mod 15k+
P: 16,027
I agree with Doc here. If you code for IE, you're not coding to a standard. You'll probably put in a few proprietary attributes, functions, etc. Now try that in Firefox. It doesn't work, so you try to fix it for Firefox. So now you've got it working in two browsers. Now you test in Opera - on no! It doesn't work there either. Try fixing that too and it goes on.

This is only an example, but you get the idea. Of course, when you code for Firefox, you should code according to standards for it too. In other words, code according to the standards, not a browser. Obviously, you test in the browsers whilst coding.

For IE support, see this link.
Mar 26 '07 #21

Atli
Expert 5K+
P: 5,058
OK.

I've been quoted incorrectly here a couple of times, tho due to memory restrictions I can not remember the names of the wrongdoers.

To clarify:
  • The initial problem was that code written FOR IE did NOT work in FF, or any other "standard" supporting browser.
  • I DO test my code in FF, tho forced to make a choice I would always choose to have my code work in IE rather than any of the rest, for obvious reasons.

Most of the developers here seem to think that we should all try to fallow the "standard", and I would have to agree.

I do however not agree with most peoples definition of the "standard".

What I mean by that is, that even tho there is a group (W3p0 or something) that publishes a set of rules that they, and most ppl for that matter, call the "official standard" which we are all so tempted to fallow.
I would argue that the actual standard is the set of rules created by Microsoft for it's IE browsers, Not because it is superior to the official standard, but because it is used by somewhere around 90% of internet users and therefor must be complied with by any serious developer.

The exception is obviously Mac and Linux users. But non-Windows users are even a "bigger" minority than non-IE users. Which makes sens really, if you think about it.

We all know the golden rule don't we? The one who has the gold, makes the rules.
And we all know who has all the gold.
Mar 27 '07 #22

acoder
Expert Mod 15k+
P: 16,027
I've been quoted incorrectly here a couple of times, tho due to memory restrictions I can not remember the names of the wrongdoers.
Well, I can sympathise with you if you feel that, but whoever has misquoted you has been too kind because what follows defies any common sense.

How on earth can Microsoft "Buggy" Corporation be the standard?! Not even Microsoft lay claim to that! In fact, IE7 has attempted to follow more closely to the correct standards (though they failed in many aspects).

Why should everyone be forced to follow a buggy 'standard'? IE7 still doesn't implement the standards properly. It's playing catch-up but it hasn't yet caught up.
Mar 27 '07 #23

Atli
Expert 5K+
P: 5,058
Well I guess I can't really hold it against ppl to misquote me, mostly because most of what I say is pure nonsence, designed to disagree with anyone who thinks his opinion is the one and only truth.
Which, seeing as hating Microsoft is somewhat of a fashion these days, always ends with me defending Microsoft. :)

But you must admit, even tho Microsoft's set of rules are way of target (assuming they were aiming for the official standard) we, developers, are pretty much forced to fallow their lead, as they control 9/10'th of the market.

So the real standard we must all live by is not the official one, it is the one created by Microsoft.
Mar 27 '07 #24

acoder
Expert Mod 15k+
P: 16,027
Let's leave out Microsoft for now and consider this. Netscape 4 was an extremely buggy browser, but was, for a while, used by many people, so it had to be supported.

But, from that, you can't set that as the standard. The whole argument is flawed.

It's not about Microsoft-bashing. I use a lot of Microsoft products and some of them are very good. However, when it comes to browsers, they are hopelessly off-target and still behind the rest of the competition.

IE6 is still the most widely used browser, so we still have all the bugs to cater for. IE7 has broken many existing pages.

When it is possible to program to a standard that works in all browsers (almost) and just requires a few tweaks to work in IE too, then why not allow support for everyone? Don't forget too that the number that use alternative browsers is increasing all the time.
Mar 28 '07 #25

Atli
Expert 5K+
P: 5,058
When it is possible to program to a standard that works in all browsers (almost) and just requires a few tweaks to work in IE too, then why not allow support for everyone? Don't forget too that the number that use alternative browsers is increasing all the time.
This is true, and I bet a majority of developers attleast try to do this. I know I do.
Sadly tho, when faced with a deadline most of us will worrie less about fallowing standards and more about making things work for the leading browser. Then if there is time, worrie about the other browsers.

The number people using alternative browsers is increasing all the time, that is also true. But this number is still far short of being any threat to IE's monopoly over the market.

There is a very logical reason why IE is as crappy as it is.
IE is basicly freeware, not technicaly of course but still, MS make no money of it. So, logicaly, they would not devote much resources to it's development.
Also, they already have most people using their software, and because of our work, most of them never know how crappy it is. Thus another reason for MS not to spend much on it.
I know this all sucks extremely much for us, as we are the once who suffer, but this is still how it is.
Mar 28 '07 #26

Post your reply

Sign in to post your reply or Sign up for a free account.