Hi all!
I have a list box that's populated from a DB. I know that you can't copy (ctrl-c) from a list box so, what should I use so the user will be able to do a copy from there to place in another application?
Thanks
Mike
Hi, Do you want to allow the user the ability to copy values from the list box control, so that they can add to, say ms word?
Yes
You could create it so that selected values are added to a textbox and then that textbox can be highlighted and pasted into word. Would that work ok for your project?
As simple solution is to add the selected text to a label, and copy the content of the label.
Or build a button 'Copy to clipboard' this link may help?http://www.geekpedia.com/tutorial126_Clipboard-cut-copy-and-paste-with-JavaScript.html
yeah, i think that would work ok.
Thanks guys!!
IE has specific JavaScript function(s) to get/set clipboard data: http://msdn2.microsoft.com/en-us/library/ms535220.aspx . For e.g., you may have a simple JS function calling the setData() after deciding what data to copy from the list box. Then invoke the JS function with a button (Copy to Clipboard) click.
Hope this helps.
0 comments:
Post a Comment