In our organization, we are still on .net 1.1 environment, using javascript, a few open source applications/widgets. Development is done using Visual Studio 2003, grid view, and iframes. Our application works in Internet Explorer 7 and IE 8 (in compatibilily mode). Can anyone give any basic steps we can take to get our application to work cross browsers? What are the starting locations we can get at to start making existing code work in different browsers?
Use jQuery for reliable cross browser JavaScript
Was it VS 2k or VS 2k3 that "helped" the developer by rewriting their HTML (in all CAPS no less)?
Make your HTML markup standards compliant. I find that developing my website following W3C standards ensure that my sites work in all major browsers.
I also develop in Firefox and then fix IE using conditional stylesheets.
The .NET version does not matter on browser compatibility.
.Net in its 2.0 iteration got a lot better (compared to 1.1) at producing cross-browser, and certainly more standards-compliant code (although not perfect by any means).
If you can upgrade to 2.0 this will get you a lot of progress on the standards compliance front for free (unless your own controls / html render as non-cross-browser html and/or javascript; then that would be the first main problem to tackle).
In .Net 2.0 don't forget to appropriately set the xhtmlconformance
attribute in your web.config
(if you're for example aiming for xhtml). This globally affects the produced html your controls produce.
- Install and Run Firefox (and get the Firebug addon).
- Enter your application and open the Firebug console (F12) to see what issues your application is encountering. (in the Console Tab)
- Start with the Errors.
- Change any JavaScript that is doing things like document.all.xxxx to use document.getElementById() or document.forms['name'].elements['name'] etc.
- Change any CSS that is using IE only styles. e.g. "cursor:hand" should be "cursor:pointer" etc.
- Repeat for Warnings once all the Errors are gone
- If your app was running in Quirks mode, consider adding a doctype so that you can render in Standards mode (makes CSS/JS much more compliant)... however note that this will very likely "screw up" your pages for a bit until you iron out the kinks.
- In the future, be sure to test in all major browsers. I'd recommend developing in Firefox or Chrome first, then tweaking if needed for IE.
First, See following for basics of cross browser compatibility tips
http://www.techbrij.com/80/7-tips-to-make-your-website-cross-browser-compatible
After this, Make sure the control is cross browser compatible If no, there is an alternate solution. you will get on google.