Have you ever wondered what the world would be like if there were only one programming language? How about a world where a set of standards were equally supported and backed by every single organization? The "pipe dream" that I described above is just that and unfortunately we have to live in a world that deals with incompatibilities and lack of standardization at every turn. So where am I going with all this? Hold on, I'll explain...
About two years ago I was assigned to a project to help build an application for a client that involved the use of ASP technology. The requirements were gathered and the original spec docs required the use of IE4 by the users of the application. So naturally, the client side scripting language of choice was VBScript and all the testing was done using IE4.
Here are a list of some of the quirks we have found with the IE/Netscape compatibility conversion and their explanations.
1. To Do: When centering objects on an HTML page use
<center> OBJECT </center>
Not To Do: The
<p align=center> OBJECT </p> that IE uses does not work in Netscape
2. To Do: Image names cannot have spaces, otherwise the image disappears in Netscape!
Not To Do: If you use a name in the image tag like this
<img src="my image.gif"> Netscape does not display it,
you must connect the string to either
<img src="my_image.gif"> or be sure to
reference the filename in HTML like:
3. To Do: Any form element that is created in Netscape must be included within a form, or else Netscape does
not even show the button.
Not To Do: Do not do:
Rather, do it like:
3a. To Do: In addition to including all elements within form tags you must also reference the form
elements by calling them out explicitly such as
document.buttonpanel.mybutton, not just
mybutton, otherwise you cannot access these elements in Netscape.
4. To Do: When using the
select() function to access a value within an element, like text
within a field, first use
select() to allow Netscape to work properly.
Not To Do: Do not try to highlight text like this in Netscape
Use this instead
5. To Do: The
window.open options string must contain no spaces otherwise the function will
fail to fire properly with the correct options in Netscape.
6. To Do: All tables must have proper closing tags such as
</table> or else the entire table disappears in Netscape. Netscape
is ruthless in this respect, if you have a table with multiple inner tables trying to find that one
missing tag can be a really tough job! Best way to solve this problem is to indent and indent with
7. To Do: Use
to access values in a
Not To Do: Do not use the
document.formname.selectname[i].value method because in Netscape the value will return
8. To Do: Use
document.formname.radioname[i].checked for radio buttons.
Not To Do: Do not use
document.formname.radioname.item[i].checked otherwise the value will
be returned as undefined in Netscape.
9. To Do: On forms in IE when finished completing items on a page the
Enter key submits the
information. In Netscape you must first focus on the
Submit button first in order to submit
information. There are a couple of workarounds to this problem that are transparent to the user, and will
even work with a submit image. An article exists that explains how to
10. To Do: You must create a form object before referencing the item, or else the object will not be able to see the form item.
11. To Do: In IE the
no such thing is available for the
BTW: Much props go out to my fellow developers Matthew Faust and Steven Schirripa