Click here to Skip to main content
15,915,702 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Hi,

I have a web application, written on asp.net, in which I'd like to add a confirm dialog box from which I'll be able to copy some of the data, same way when you have those Windows exceptions (those "Send" \ "Don't Send" alerts) where you can open the details and you can copy the details from there.

The dialog box should not be necessarily with this "More Details" button, I just should be able to copy some of the data from the dialog and not be able to edit it.

Thanks
Posted
Comments
pradiprenushe 10-Jul-12 5:27am    
Are you talking about Prompt Box?
DanaH85 10-Jul-12 5:30am    
It can be, if I can disable the textbox for editing...
It supposed to notify you that there are a list of items and write all of them down in a textbox so the user can copy the list.

Then the user get to choose whether to confirm or cancel the action
pradiprenushe 10-Jul-12 5:34am    
I think you should use Ajax ModalPopup Control.
DanaH85 10-Jul-12 5:40am    
There's no way I can avoid Ajax?
pradiprenushe 10-Jul-12 6:05am    
I think you dont need popup value. While you are sending value to popup you can save it & use it later accordingly. Can you elaborate some more with actual example.( What are you using, when popup comes, how you are going to send data in popup)

For a way of presenting the message, I would recommend jQuery modal box. Please see this tutorial:
http://www.jacklmoore.com/notes/jquery-modal-tutorial[^].

As all presented data is known to your modal object, you can collect it and use to submit the issue information using Ajax. For this purpose, you can add a button like "Submit Issue Information" or something like that. You can use jQuery Ajax method(s) for this purpose:
http://api.jquery.com/category/ajax/[^].

If you can write data to the client's clipboard, you can easily find appropriate plug-in code. Such as those:
http://www.steamdev.com/zclip/[^],
http://archive.plugins.jquery.com/project/clipboard[^].

This article provides some overview on using the client's clipboard:
http://www.deluxeblogtips.com/2010/06/javascript-copy-to-clipboard.html[^].

—SA
 
Share this answer
 
Press Ctrl + A . The message in the alert/confirm box will be copied to clipboard ( but will not be seen 'selected' on the confirm/alert box).

Then open notepad or any text editing application and press Ctrl + V.

If you don't believe this trick , then try it yourself first..
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900