[ 2 posts ]

Adam Nasralla

  • Username: adam_nasralla
  • Joined: Tue Mar 20, 2012 8:21 am
  • Posts: 2
  • Offline
  • Profile

Datasource working in IE but not in Chrome

Post Posted: Tue Mar 20, 2012 9:48 am
+0-
Hi,

I'm brand new to YUI. Just started today. I've managed to modify one of the examples to display XML data from a local XML database in a DataTable (YUI 3). The code works in IE8 but the datasource request is failing in Chrome 17. Any help would be much appreciated.

Please see the code in question below:


<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>

<div id="table" class="yui3-skin-sam dt-example"></div>

<script>
YUI().use("datasource-io", "datasource-xmlschema", "datatable-datasource", function(Y) {

var cols = ["name", "id"];

var dataSource = new Y.DataSource.IO({
source:"http://localhost:8080/exist/rest/"
});


dataSource.plug(Y.Plugin.DataSourceXMLSchema, {
schema: {
resultListLocator: "collectible",
resultFields: [{key:"name", locator:"@name"}, {key:"id", locator:"@id"}]
}
});

var table = new Y.DataTable.Base({
columnset: cols,
summary: "Collectibles List",
caption: "Collectibles List"
});

table.plug(Y.Plugin.DataTableDataSource, {
datasource: dataSource,
initialRequest: "?_query=for%20$x%20in%20doc('/db/sims/config/database/collectibles.xml')//collectibleitem%20return%20<collectible%20name='%7B$x/@name%7D'%20id='%7B$x/@id%7D'/>&_howmany=1000"
});

dataSource.after("response", function() {
table.render("#table")}
);

});

</script>




Many thanks,

Adam

Adam Nasralla

  • Username: adam_nasralla
  • Joined: Tue Mar 20, 2012 8:21 am
  • Posts: 2
  • Offline
  • Profile

Re: Datasource working in IE but not in Chrome

Post Posted: Wed Mar 21, 2012 2:08 am
+0-
I'm presuming this is a security issue. It doesn't work in Firefox either but it is strange that it is working in IE8. Any help or even a nudge in the right direction would be really appreciated.
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum