:: Forum >> Version 2 >>

Populate table

// create ActiveWidgets data model - XML-based table
var table = new AW.XML.Table;

// provide data URL
table.setURL("www.showmetheparts.net/bin/ShowMeWebXML.exe?lookup=make&year=2000");

// start asynchronous data retrieval
table.request();

// define column labels
var columns = ["id", "datavalue"];

this works for fixed xml document, but not when I call application that returns same xml document. any ideas?
JWright@VerticalDev.com
Wednesday, June 13, 2007
Are you making the request to a different host/domain? If so - it is not allowed by the browser security restrictions.
Alex (ActiveWidgets)
Thursday, June 14, 2007
var table = new AW.XML.Table;
table.setURL('bin/ShowMeWebXML.exe');
table.setParameter('year', '2000');
table.request();
var columns = ["id", "datavalue"];
var obj = new AW.UI.Grid;
obj.setId("myGrid");


I've tried this code and returns empty grid. I have a folder called bin under basic.htm with the CGI script and all the data. I'm not sure if it is code or the script at this point. Any ideas how I can solve this or debug this.

Thanks, Jay
JWright@VerticalDev.com
Thursday, June 14, 2007
First, open the data URL in Internet Explorer and verify that there is no XML parsing errors.

Then check that it is actually loaded by AW.XML.Table class -

var table = new AW.XML.Table;
table.setURL(...);
table.response = function(data){
alert(this.getResponseText());
alert(this.getResponseXML());
}
table.request();

http://www.activewidgets.com/aw.http.request/response.html
Alex (ActiveWidgets)
Thursday, June 14, 2007



This topic is archived.

Back to support forum

Forum search