I write a page that contain following function:
this site contain a html file upload control, which allow user to upload
once the image had been uploaded, it will automatic display on the
current page without refresh entire page.
iframe (which is also in my current page) that can load the image into
my page ( say in
however, when upload an invalid file (I use attachment_fu’s
validate_as_attachment), the error result is return to iframe due to
iframe is the target of form ( form id=“uploader” target=“my_iframe”> )
I wanna display the error message, but the code is stop after entire
page with error is return to my iframe.
my code look this :
#success code logic
render :action=>‘new’ #return entire template in iframe,
is that any way to display in error in main page?
Is that any possible solution for it ?