Confirm while uploading file


Hi all
Iam new to ruby.

In my application i have to upload csv file and there is submit
button.when i submit the from its working fine.but i want to confirm
from the user when he clicks on submit button, means it has to ask for
are u sure? and while procesing the request i have to display message
uploading… or processing request…
that has to make the user submit the file once again…

Please help me

Warm regards,