ALP Copy method
Copies the current selection (if any) to the clipboard.

Syntax and description

external.Copy();

Remarks

By default no text, nor any other information can be copied to the clipboard from an ALPFrame window. ALPFrame is designed for applications where such default behavior is most likely desired. However most applications need to allow the user to copy some data from the pages or may be any data in some cases. To do so the application can use this function in its DHTML scripts.

Guideline:

If you want to allow any selection to be copied the best place to call this function will be a menu handling code - e.g. add a menu and may be accelerator keys and handle the appropriate item (usually Edit-Copy) by simply calling this function. Also if you have nothing else in mind you can show the same menu where the Copy item resides as shortcut menu (usually the Edit menu) when the user right clicks on the page. 

If you want to allow the user to copy only certain data from the page you will need to implement routines in the client-side script that will select the appropriate part from the page and then call the Copy method. Use the standard DHTML object model to define the selection (see MSDN or any other source for complete documentation of the standard DHTML model). Another way to do so is to implement menu handlers and check what is actually selected and call the Copy method only if the selection passes some tests. This will require much more efforts, but can be desired if you want to force the user to use your application every time he/she needs the data. One simpler case is the case where you want to permit the user to copy to clipboard only single items (for example content of a control - text box or area) then the mentioned selection test will be simple enough.

Applies to: external

newObjects Copyright 2001-2006 newObjects [ ]