hello,
im using the latest 2.1 ckfinder with the progress upload bar. which is very help and much needed upgrade from the previous version.
Ive build a simple php ckfinder plugin using onAfterFileUpload() and if there is an error in the upload i echo a message and return false. works perfectly for me. however if i try to upload a new file again after that, i dont get the progress bar notification anymore. BUT if i hit the upload form's "cancel" button and then try upload again i do get the progress bar experience again.
anyone know if there is a way in the php plugin to refresh or reset the form on error in a php plugin to get it to return to the default state. ive trying to echo some javascript in the error message but it would not execute. so even if there was a way i can execute some inline javascript from my php plugin i could do .click() on the cancel button which would seem to solve the issue
thanks for any help
im using the latest 2.1 ckfinder with the progress upload bar. which is very help and much needed upgrade from the previous version.
Ive build a simple php ckfinder plugin using onAfterFileUpload() and if there is an error in the upload i echo a message and return false. works perfectly for me. however if i try to upload a new file again after that, i dont get the progress bar notification anymore. BUT if i hit the upload form's "cancel" button and then try upload again i do get the progress bar experience again.
anyone know if there is a way in the php plugin to refresh or reset the form on error in a php plugin to get it to return to the default state. ive trying to echo some javascript in the error message but it would not execute. so even if there was a way i can execute some inline javascript from my php plugin i could do .click() on the cancel button which would seem to solve the issue
thanks for any help
Re: PHP Plugin error handling, reseting the upload form
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: PHP Plugin error handling, reseting the upload form
on fail the plugin echos the error to the dialogue window.
the plugin is very basic. what im looking for is on return false to reset the state of the upload form (clicking the form's cancel button). so when the user tries to upload a different file, this will force the user to click the "upload" link, then upload form will appear again. from there the progress bar and progress info will display again for the next uploaded file.
as it works now, on the next upload after the fail, no progress bar or info are displayed.
i assume this would need some javascript callback to trigger this action but see any way to do that
let me know if i can provide any other info.
Attachments: