Two Laptop Bag*
The moose likes HTML, CSS and JavaScript and the fly likes Any browser compatability issues with Ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Any browser compatability issues with Ajax" Watch "Any browser compatability issues with Ajax" New topic
Author

Any browser compatability issues with Ajax

sunitha reghu
Ranch Hand

Joined: Dec 12, 2002
Posts: 937
Is there any browser compatability issues with Ajax/
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
All major browsers support it as long as JavaScript is enabled.

Eric
sunitha reghu
Ranch Hand

Joined: Dec 12, 2002
Posts: 937
Mozilla and IE sometime beahves differently for JS. Is ajax does have that issues. Is Ajax browser dependent?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

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?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Dec 12, 2002
Posts: 937
But we cant use a simple javascript right? Document.all is needed is so many cases right?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Dec 12, 2002
Posts: 937
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Any browser compatability issues with Ajax
 
Similar Threads
Browser independent menus
selectManyPicklist
Problems during struts application migration from weblogic 6.1 to weblogic 8.1
This weeks Giveaway
Tomcat 6 on JDK 1.6