On 21 October 2010 06:48, Amit Tomar <[email protected]> wrote: > Colin Law wrote in post #955797: >> On 20 October 2010 14:37, Amit Tomar <[email protected]> wrote: >>> BUTTONS_OKCANCEL = 1 >>> >>> user32 = DL.dlopen('user32') >>> name=DataFile.save1(params[:upload]) >>> #puts line.size >>> "Proceed?", BUTTONS_YESNO) >>> if response == CLICKED_YES >> >> This code is in the controller and so runs on the server. There is no >> way it can appear on the client machine. >> >> Colin > > But colin is it possible to do something like this using javascript??
You will have to do the upload as a multi-step operation, maybe using AJAX. For example you could first post just the filename, get the server to check the name and send the result back to the client to display the overwrite question if necessary. Then do the upload if appropriate. You may have to re-check the filename again of course in case another file of that name has been uploaded in the meantime. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

