Wednesday, July 5th, 2006

uniAjax: an ajax framework focused on browser support

Category: Ajax, JavaScript, Library

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.


Here is an example that makes a simple ajax request and shoves in the result to a div:

  1. <script language="JavaScript"><!--
  3.        // create uniAjax object:
  4.        ajax = new uniAjax();
  6.        /* define function that receives the response of the Ajax request.
  7.         * parameters:
  8.         * - response: the returned string (must be param 1)
  9.         * - id: individual param that sets the id of the element that will contain the response
  10.         */                          
  11.        takeResponse = function(response, id) {
  12.            if (typeof id != 'undefined')
  13.                document.getElementById(id).innerHTML = response;
  14.        }
  15.    //--></script>
  17.     <input type="button" value="Insert in div 1" onclick="ajax.request({'url': 'response.php', 'func': takeResponse}, 'content1');"/>
  18.     <input type="button" value="Insert in div 2" onclick="ajax.request({'url': 'response.php', 'func': takeResponse}, 'content2');"/>
  20.     <div id="content1"></div>
  22.     <div id="content2"></div>

Posted by Dion Almaer at 9:12 am

3.6 rating from 53 votes


Comments feed TrackBack URI

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…

Trackback by Scott's Misguided Brilliance — July 5, 2006

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.

Comment by Liming — July 5, 2006

Iframes is the way to go.

He uses them as a fallback!

Comment by poni — July 6, 2006

How about Subsys_JsHttpRequest by Dk ?

Comment by sb — July 7, 2006

@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.

Comment by Dan — July 7, 2006

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”.

Comment by Andi — July 8, 2006

nice to meet you

Comment by kuk — July 20, 2006

It doesn’t work in Opera 7.5x, frame doesn’t work. I trying Subsys_JsHttpRequest framework

Comment by david nguyen — August 18, 2006

>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 and special see
working with Subsys_JsHttpRequest very simple… just try it ;)

P.S. sorry 4 my english

Comment by Paul — September 12, 2006

Leave a comment

You must be logged in to post a comment.