This was a post I found on the labs forums site at adobe, but I can't find it for the life of me right now. Before the IE caching problem neither firefox or ie were loading the new data after I updated the database and it turned out to be an internal spry caching problem. The following comes for the posting in the forum. The key for me was the useCache:false part that you stick at the end of the Spry.Data.XMLDataSet call.
If you're going to be updating the data set by re-loading the same URL, make sure you turn caching off:
After that, you'll want to define a function callback that will be triggered *after* your server request to update the record:
function UpdateRecordCallback(req)
{
// We just finished updating a record, force myDataSet to
// reload the data from the server so our regions auto update.
myDataSet.loadData();
}
Then use the loadURL() utility function to send your request. You'll have to pass your callback function to loadURL so that it gets called when the request succeeds:
function UpdateMyRecord(recordID)
{
Spry.Utils.loadURL("GET", "closetesrecord.php?id=" + recordID, true, UpdateRecordCallback);
}
...
Thursday, October 26, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment