views:

83

answers:

5

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?

+2  A: 

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)?

hunter
I agree with jQuery, good addition!
Dustin Laine
It was Visual Studio 2003 that "helped" the developer by writing the html
Xpiatio
+1  A: 

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.

Dustin Laine
Not downvoting, but .Net 2.0 got a lot better at producing standards compliant code.
ChristopheD
Agree, was referring more about template markup and not control generated HTML, which he cannot change without upgrading the whole application.
Dustin Laine
A: 

.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.

ChristopheD
+1  A: 
  1. Install and Run Firefox (and get the Firebug addon).
  2. Enter your application and open the Firebug console (F12) to see what issues your application is encountering. (in the Console Tab)
  3. Start with the Errors.
    1. Change any JavaScript that is doing things like document.all.xxxx to use document.getElementById() or document.forms['name'].elements['name'] etc.
    2. Change any CSS that is using IE only styles. e.g. "cursor:hand" should be "cursor:pointer" etc.
  4. Repeat for Warnings once all the Errors are gone
  5. 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.
  6. 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.
scunliffe
A: 

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.

Brij