Wednesday, July 5th, 2006
uniAjax: an ajax framework focused on browser support
Andreas Kalsch wanted an Ajax framework that could run on nearly all of the browsers out there, so he created uniAjax.
Tactics for browser compatibility is dropping down to iframes as other frameworks do.
Example
Here is an example that makes a simple ajax request and shoves in the result to a div:
- <script language="JavaScript"><!--
- // create uniAjax object:
- ajax = new uniAjax();
- /* define function that receives the response of the Ajax request.
- * parameters:
- * - response: the returned string (must be param 1)
- * - id: individual param that sets the id of the element that will contain the response
- */
- takeResponse = function(response, id) {
- if (typeof id != 'undefined')
- document.getElementById(id).innerHTML = response;
- }
- //--></script>
- <input type="button" value="Insert in div 1" onclick="ajax.request({'url': 'response.php', 'func': takeResponse}, 'content1');"/>
- <input type="button" value="Insert in div 2" onclick="ajax.request({'url': 'response.php', 'func': takeResponse}, 'content2');"/>
- <div id="content1"></div>
- <div id="content2"></div>





3.6 rating from 53 votes
uniAjax – Universal Browser Support for AJAX
Now this is worth talking about.
Browsing through Ajaxian, I came across an article regarding a handy new tool for all you AJAX lovers out there.
One of the biggest problems designers come across on a daily basis is the lack of compatibility from one b…
Finally somebody got it right! Iframes is the way to go.
I’m wondering what other PURE javascript frameworks are using Iframes as refered to by this article? I tried dojo, it crashes when I fit enter into their homepage when my IE disabled all ActiveX. Scriptaculous, nope! Atlas? Nope.
AjaxPro.NET got it right, but its’ a .NET centric framework, wont’ work if the user doesn’t have it installed.
He uses them as a fallback!
How about Subsys_JsHttpRequest by Dk ?
@Liming : not sure what form of crack you’re on, but .NET websites don’t require the user to have .NET installed on their computer. The framweork generates HTML/JS. It would be a pretty lame web-based language if it required a particular install on every users machine.
Searching for “Subsys_JsHttpRequest” in Google I only find Russian websites. I don’t know why and I don’t know what Subsys_JsHttpRequest is.
@ Liming: You are completely right excepting the last sentence. What you say was my motivation to write this framework because dojo is not really web-ready. The dojo examples on their site don’t work in IE 5.5, let crash IE 6 and cause errors in Firefox (script does not stop). Atlas does not work in Opera and only partially in Firefox. I don’t know what all those “big players” are doing. I am not interested if the code is “elitist”.
hi~
nice to meet you
It doesn’t work in Opera 7.5x, frame doesn’t work. I trying Subsys_JsHttpRequest framework
>Searching for “Subsys_JsHttpRequest†in Google I only find Russian websites.
>I don’t know why and I don’t know what Subsys_JsHttpRequest is.
this is powerful lib for ajax staff. you found russian web sites because Subsys_JsHttpRequest created by Dmitry Koterov russian php book’s author. visit http://en.dklab.ru/lib/Subsys_JsHttpRequest/ and special see http://en.dklab.ru/lib/Subsys_JsHttpRequest/demo/test/
working with Subsys_JsHttpRequest very simple… just try it ;)
P.S. sorry 4 my english