View Full Version : Yet another upload issue
obsidian
27 Sep 2007, 7:11 AM
As many others have posted, I also am struggling somewhat with the using the BasicForm for image uploads. The actual upload process is working quite nicely, but what I am struggling with is finding documentation for returning messages and/or codes back to the calling function in order to alert the user to processing difficulties. I have read many threads referencing XML, and I have been getting the following error:
unexpected end of XML source
**/js/lib/yui-ext/ext-all-debug.js
Line 6512
Is there a reference to which someone can point me for how best to return and handle responses from my upload form?
Thanks in advance.
obsidian
27 Sep 2007, 11:02 AM
I've narrowed the problem down some. I initially thought the issue was with my JSON response, but after playing for a couple hours and reading this thread (http://extjs.com/forum/showthread.php?t=8129&highlight=response+uploads), I realize my format is indeed being returned, but there is an error on parsing only when it is a successful return, for some reason.
Here is my actual assignment of my submit button:
fs.addButton(
'Upload',
function() {
fs.submit({
waitMsg: 'Uploading...',
reset: false,
failure: function(fs, action) {
Ext.MessageBox.alert(action.result.error, action.result.info);
},
success: function(fs, action) {
Ext.MessageBox.alert('Confirm', action.result.info);
fs.reset();
}
});
}
);
This is working to alert any failures with my appropriate response, but my success is returning the above mentioned error. Any suggestions?
obsidian
27 Sep 2007, 12:13 PM
Well, I got it fixed. I feel rather sheepish now. It turns out it was actually my handler PHP script. When certain variables were being passed, I was getting unexpected PHP errors thrown that were in turn causing the expected JSON response to be skewed.
Getting the cart before the horse with this one :((
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.