From: Jeremy Bopp Date: 2010-10-20T23:08:59+09:00 Subject: Re: Messagebox on client side On 10/20/2010 8:50 AM, Amit Tomar wrote: > Thanks jermy for your response ,this is something i want to achive .In > my application am uploading file to a folder but file is already there > it would ask for overwrite by displaying messagebox but problem i > already told .Could you suggest some other way to achieve this > means i don;t know much about javascript .can we send desktop of one > machine to other?? No, you cannot send the desktop, and you wouldn't want to either. I'll leave you to think of scary reasons you never want to do that. Your only option is to send a response to the user asking for confirmation in the event that the file exists. That response could simply be another page that has a couple buttons for Yes or No options. You would have to make the server store the uploaded file into some sort of temporary location in this case since the file will be uploaded from the first page. Once the user confirms to overwrite the file, the server could then move the file from the temporary location to the final one. That's all very rough, unfortunately. I don't have enough experience with web apps and Rails to help you with anything concrete. All I can say is that you have headed down the completely wrong path with using the Win32 API to handle this prompt to the user. It cannot be made to work. There are options available in javascript that will allow you to do something similar from within the client's browser, but I don't know the details of how to use those functions. Someone on the Rails list should be able to help you more. -Jeremy