Can I create a dojox.data.XmlStore file with a url pointing to a different port or server

In the future, I want to replace /books.xml

it with something like http://server:port/books

. Basically, the XmlStore must be served by some other server or port than the one that serves this

<div dojoType="dojox.data.XmlStore" url="/books.xml" jsId="fileStore_book" rootItem="book"></div>
<div dojoType="dojox.grid.data.DojoData" jsId="model_fileStore_book" store="fileStore_book" query="{title:'*'}"></div>
<div
    id="fileGrid_book"
    dojoType="dojox.Grid"
    model="model_fileStore_book"
    rowsPerPage="10"
    style="width: 400px; height: 300px;"
>
    <script type="dojo/method">this.setStructure([{cells: [[{field: "isbn", name: "ISBN", width: 10}, {field: "author", name: "Author", width: 10}, {field: "title", name: "Title", width: 'auto'}]]}]);</script>
</div>

      

0


source to share


1 answer


The data warehouse is subject to "same origin" constraints as all data sources in web applications. You should either proxy another server using your server, or consider alternative ways to access the data, such as JSONP or window name wrapping.



0


source







All Articles