Cross Browser Ajax Function To Dynamically Load Html
Solution 1:
I would have to agree, don't go reinventing the wheel, or in this case, AJAX.
JQuery and Prototype do an excellent job of letting you NOT have to deal with cross-browser support, and greatly simplifying Javascript type programming. I fell into JQuery first so I'm biased towards it, and from what I've seen the library is a little smaller (read: faster in the browser), but Prototype I believe has been around longer and has TONS of plugins and examples out there. Ruby on Rails also by default uses Prototype. Funny enough, the code in both looks very similar and takes little rewriting to change libraries.
JQuery Tutorials <-- Just head on down to the AJAX section
Solution 2:
Or you can try this if you don't need an entire framework: http://www.hunlock.com/blogs/The_Ultimate_Ajax_Object
Solution 3:
I would suggest using any of a number of different javascript frameworks for this functionality instead of reinventing it. There's jQuery, Prototype/Scriptaculous, MooTools, Dojo, and many others. All of these offer cross-browser support for what you are doing.
Solution 4:
I recommend jQuery, but there is also a very lightweight solution: XHConn
Solution 5:
If I were you, I'd use a toolkit like JQuery in order to make sure that it is as compatible as possible. No matter what, however, you're going to have to deal with the cases where it doesn't work. Don't forget that there are plenty of people who browse without javascript support.
Post a Comment for "Cross Browser Ajax Function To Dynamically Load Html"