Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any browser compatability issues with Ajax

 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any browser compatability issues with Ajax/
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All major browsers support it as long as JavaScript is enabled.

Eric
 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mozilla and IE sometime beahves differently for JS. Is ajax does have that issues. Is Ajax browser dependent?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric,
All major browsers of all major modern browsers? We've finally gotten off NS 4.7, but that got me thinking about what sites that need to support the general public do. My guess is that old browsers lack the capabilities to work with Ajax.

I've seen sites do a test to see if they are on a modern browser and if not, redirect to an "upgrade your browser" page. How does this relate to Ajax where everything is on one (the first) page?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IE and Gecko browsers do have differences. If you code more towards the standards, you have less problems. This means staying away from document.all! Our book shows you the common pitfalls of JavaScript with the 5 example projects in the book, plus all of the snipplets of code. The Ajax content loaders that are developed in the book takes all of the hassle out of making the cross browser request so you do not have to worry about if IE needs ActiveX. There is even a section on some JavaScript stuff in the index.

Eric
 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But we cant use a simple javascript right? Document.all is needed is so many cases right?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
document.all is IE only and should not be used at all in any development!! IE supports document.getElementById which every browser supports.

document.all is a catch all in a web app since it was used to reference anything on the page and promoted bad coding. Trust me, I used it back in the NN4 and IE war days years ago!

Eric
 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think its bad coding. Document.all is used in IE4. Other browsers
were not supporting this at that time.Now Mozilla supports this.


Originally posted by Eric Pascarello:
document.all is IE only and should not be used at all in any development!! IE supports document.getElementById which every browser supports.

document.all is a catch all in a web app since it was used to reference anything on the page and promoted bad coding. Trust me, I used it back in the NN4 and IE war days years ago!

Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by thara nambiar:
I dont think its bad coding. Document.all is used in IE4. Other browsers
were not supporting this at that time.Now Mozilla supports this.


I am not going to go browser war talk here!

It was bad coding since you could reference document.all and get a name and id, and so on. You could get an array of ids, but ids are supposed to be singular. IE had a lot of quirks that document.all abused. And hence bad coding. Feel free to use it along with document.layers. We are not in the world of IE4 and NN4 days. We are in the world of browsers that should be following standards. IE still has a way to go, but it is closer. I am an IE guy, use IE as my everyday browser so do not say I am an IE hater. My last job, we only coded for IE.

And we are going with this right now: http://www.ecma-international.org/publications/standards/Ecma-262.htm so it really is not JavaScript that we use, but we keep the name.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic