Results 1 to 10 of 10
  1. #1
    Join Date
    May 2008
    Posts
    36
    How do you make a site cross broswer compatible.. like.. I don't even know which programming language it's in. I googled some tips on how to do it and found that it is mostly done in Javascript. But in that case I would have 2 questions.
    a) can you incorporate the javascript code into HTML?
    and b) how would I go about making a site cross broswer compatible?

  2. #2
    Join Date
    May 2008
    Posts
    257
    How do you make a site cross broswer compatible.. like.. I don't even know which programming language it's in. I googled some tips on how to do it and found that it is mostly done in Javascript. But in that case I would have 2 questions.
    a) can you incorporate the javascript code into HTML?
    and b) how would I go about making a site cross broswer compatible?
    You've hit on the bane of the web developer's existence. Yes, you incorporate your javascript into the HTML. There are a number of ways to do it (include the src files, code it right in the html, or depending upon whether or not you're using a server-side language like asp.net, you can "inject" javascript into your application at the required points.
    Cross-browser compatibility becomes more of an issue the more complex the client-side processing gets. I work for a school district and my apps have to run on macs & pc's, and all the browser flavors that come with both of them. I've even found that the same version of Internet Explorer bahaves differently on different versions of Windows (IE 7 on XP vs Vista).
    About the best advice I can offer is don't do any more on the client side than is absolutely necessary, avoid using javascript/css features that are specific to any one browser, and use the most widely accepted standard method of accomplishing specific tasks (eg. document.getelementbyid('xxx').value, etc).
    If you do a search on google, you'll find many useful articles on the most common DOM differences between the browsers, and lots of suggestions on how to work around them.

  3. #3
    scaledsolutions Guest
    If you do a search on google, you'll find many useful articles on the most common DOM differences between the browsers, and lots of suggestions on how to work around them.
    I would suggest checking out one of the many javscript frameworks that are available today. There is jQuery, mootools, scriptaculous, dojo and many others. These frameworks have already solved the haunting cross browser issues, and allow you to focus on developing the UI functionality you need for your site.

  4. #4
    Join Date
    May 2008
    Posts
    257
    scaledsolutions makes an excellent point, the framework solutions do take care of all the cross-browser issues behind the scenes, then it becomes a non-issue for the developer.
    However, if your needs are very basic, employing a framework might be overkill for you because it introduces another layer of complexity to your development. It still doesn't relieve you of having to understand javascript, because you will still need to understand how things function when you have to debug your app.

  5. #5
    scaledsolutions Guest
    It still doesn't relieve you of having to understand javascript, because you will still need to understand how things function when you have to debug your app.
    Absolutely! Without a strong understanding of the DOM and CSS as well as the basics of javascript, the frameworks could leave you feeling very frustrated. I settled on jQuery for my javascript development, but I have also had to learn more about javascript along the way to aid in troubleshooting.

  6. #6
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    What I do is make sure the code is clean (free of errors), compliant to w3c standards, test in Firefox, then fix for IE.

  7. #7
    Join Date
    May 2008
    Posts
    257
    What I do is make sure the code is clean (free of errors), compliant to w3c standards, test in Firefox, then fix for IE.
    If only life were that simple... I have to make sure my pages function on Mac Safari, Mac Firefox, Windows IE, Windows Firefox, Windows Safari, and now Google Chrome, on several versions of each browser, and on several versions of each operating systems.
    Tell me I'm not having loads of fun

  8. #8
    Join Date
    May 2008
    Posts
    257
    On the note of js frameworks, I'm a .Net developer, and Microsoft officially includes jquery as part of visual studio now. I haven't had a chance to play with it yet, but I'm really looking forward to it. It will have all the benefits like intellisense, lots of help and examples, and I believe some built-in error checking within the ide.
    Very cool stuff.

  9. #9
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    If only life were that simple... I have to make sure my pages function on Mac Safari, Mac Firefox, Windows IE, Windows Firefox, Windows Safari, and now Google Chrome, on several versions of each browser, and on several versions of each operating systems.
    Tell me I'm not having loads of fun
    I am speaking from experience. If the code is clean, standard-compliant and works on Firefox, IE7 and IE6, chances are it will work fine on other browsers as well. Chrome and Safari use the WebKit engine, so those will work fine.

  10. #10
    Join Date
    May 2008
    Posts
    257
    I am speaking from experience. If the code is clean, standard-compliant and works on Firefox, IE7 and IE6, chances are it will work fine on other browsers as well. Chrome and Safari use the WebKit engine, so those will work fine.
    I agree, on the newer versions once I have it working right in firefox, just about everything else falls in line.
    The difference is the fact that there are sometimes differences in the browsers depending upon platform, and sometimes the same version of a browser on different versions of the OS. I've already run into both situations at least once.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •