How can I add a cancel button next to the upload button which will stop
the uploading of multiple files, and how would it be done?
Your reply is appreciated.
How can I add a cancel button next to the upload button which will stop
the uploading of multiple files, and how would it be done?
Your reply is appreciated.
Hi Joan,
Joan Gu wrote:
There are two components to your question, so I’ll break it up.
How can I add a cancel button next to the upload button
According to the W3C spec, a form can only have one button within the
tags that submits the form params. As long as you don't need to carry along the form params on your cancel, the easiest way to do what you're wanting is to use a button_to outside your form tags and then use CSS to position it, from a visual perspective, along-side the submit button and make it _appear_ to the user that side the form has two buttons.which will stop the uploading of multiple files, and how would it be done?
If you mean ‘stop the uploading after its been started’, this is a tough
one
and I’m not aware of any built-in support in either Ruby or Rails for
doing
it. It’s a good question though. I know the capability is built into
other
tools, so there must be a way to do it. Maybe someone else will be able
to
help with this. It’s definitely interesting. I’ll cipher on it and see
if
I can come up with something.
Best regards,
Bill
Hey Bill,
Thanks for reply. Yes, I meant to be stop the uploading after it’s been
started. I did some search, but comes with no rails solution. Flash is
an alternative way to do it. Well, last time I use Flash was 7 years
ago…
Best,
Joan
On Tue, Aug 19, 2008 at 12:13 PM, Bill W. [email protected]
wrote:
According to the W3C spec, a form can only have one button within the
tags that submits the form params.
Uh, sorry, that’s simply not true; multiple SUBMIT buttons are fine.
http://www.w3.org/TR/html401/interact/forms.html#submit-button
17.2.1 Control types
HTML defines the following control types:
buttons
Authors may create three types of buttons:
submit buttons: When activated, a submit button submits a form. A
form may contain
more than one submit button.
Hassan S. ------------------------ [email protected]
Hi Hassan,
Hassan S. wrote:
Uh, sorry, that’s simply not true; multiple SUBMIT buttons are fine.
http://www.w3.org/TR/html401/interact/forms.html#submit-button
Thanks for the correction. I was thinking forms within forms, which is
how
this typically comes up. You are correct of course.
Best regards,
Bill
On 20 Aug 2008, at 16:42, Joan Gu wrote:
Thanks for reply. Yes, I meant to be stop the uploading after it’s
been
started. I did some search, but comes with no rails solution. Flash is
an alternative way to do it. Well, last time I use Flash was 7 years
ago…
There is no solution with normal form submits, and you don’t need to
know anything about Flash to use a Flash uploader. Go check on
swfupload.org and search the list archives for a post i made about
SWFUpload and Rails.
Best regards
Peter De Berdt
Hi Peter,
Peter De Berdt wrote:
There is no solution with normal form submits, and you
don’t need to know anything about Flash to use a Flash
uploader. Go check on swfupload.org and search the list
archives for a post i made about SWFUpload and Rails.
That’s cool. Looks like something I’ll want to add to my toolkit. I
would like to understand how it’s done though. I haven’t been able to
come up with the right search string for Google. Nothing gets me to the
protocol definition type stuff I’m expecting looking for. Can you point
me?
Thanks,
Bill
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs