3.2.0

AW Ajax in Action

Guys, please check

http://activewidgets.thej2ee.com/ajaxdemo/examples/ajax/demo1.html

Ajax response,

http://activewidgets.thej2ee.com/ajaxdemo/examples/ajax/ajax1.php

Typical response

<ajax-response>
    <response id="alert_ip" type="script">
        alert("Your Ip is xx.xx.xx.xx");
    </response>
    <response id="myip" type="element">
        &lt;font color="red"&gt;xx.xx.xx.xx&lt;/font&gt;
    </response>
    <response id="current" type="script">

        alert("Current time is " + new Date());
    </response>
</ajax-response>



Main file,

http://activewidgets.thej2ee.com/ajaxdemo/source/lib/ajax/engine.js

Only problem is that, as of now it works only in I.E. Firefox on XP (sp2) throws following exception

Error: uncaught exception: [Exception... "Object cannot be created in
this context" code: "9" nsresult: "0x80530009
(NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "<unknown>"]

Once it becomes stable, I'll add better demo and documentation. You no longer need to look somewhere else for your Ajax need. With Ajax these widgets will get much much powerful. Isn't it?

Cheers,
Sudhaker
http://thej2ee.com
Sudhaker Raj
October 7,
Anyone, had any luck with Firefox?
Sudhaker Raj
October 19,

if (!xml.nodeType) {
    var s = "" + xml;
    
    if (window.ActiveXObject)
    {
        xml = new ActiveXObject("MSXML2.DOMDocument");
        xml.loadXML(s);
    }
    else if(document.implementation)
    {
        var parser = new DOMParser();
        xml = parser.parseFromString(s, "text/xml");    
    }    
}


After wasting hours got another problem

var responseText = responseElement.text; // works in IE
var responseText = responseElement.firstChild.nodeValue; // works in gecko

There was a magical statement (perhaps to fix this) inside browsers/gecko.js in 1.x version but it is commented now in 2.x - Why Alex?

element.__defineGetter__("text", function(){return this.firstChild.nodeValue});

Sudhaker Raj
October 19,

This topic is archived.

See also:


Back to support forum