I'm wondering if there is a way to programmatically copy a string within a Vortex script to the clipboard of the *client* workstation, so that it can then be pasted into a separate local application. If there was a way to execute a *local* application (i.e., an EXE on the client workstation) from within a Vortex script, I could certainly write a simple app that would place a string (which I would pass from the Vortex script) onto the clipboard. That would work fine.
But I don't how to do that. Any help would be greatly appreciated.
You've got it - there's no way for vortex to interact with the clipboard directly, so EXECing another program that does would be your best bet.
UPDATE - oops, misread the question. John's right, nothing vortex-related will let you interact with the CLIENT clipboard, you'll need to use custom javascript.
<exec> will run a program on the server running Vortex, not on the client browser. In general you can't run programs on client's machines, as that is how viruses etc spread. You can copy to the clipboard with Javascript by having Vortex output the appropriate javascript. You might want to check http://www.htmlgoodies.com/beyond/javas ... hp/3458851 for ideas on how to get started.
Been working on this for a few hours without much progress. I think I'll abandon it if I can't get it working in a few more. So with that, here's what I got so far...
I found a snippet of Javascript that ostensibly copies the content of a textarea to the client machine clipboard. Assuming that it works, that is the functionality that I'm after here.
I've left out a bunch of code that gets the user eventually to the page with the textarea on it. (See below.) Next in the file is the Javascript that I'm trying to run on click of the "Copy to Clipboard" button, as follows:
Finally, there is the procedure that contains the form that contains the button, as follows:
<a name="Edit Filter" PUBLIC>
...
<form name="showFilter" method="post" action="$url">
<textarea name="filterText"
cols="60"
rows="6"
wrap="soft">$ret
</textarea><br>
<input onclick="docopy('filterText')"
type="button"
value="Copy to Clipboard">
</form>
...
</a>
...
</script> <!-- This is at the end of the file -->
The form with the textarea builds fine (note that the $ret that's pasted in the textarea in the above snippet is the return from a function that's irrelevant to this discussion), and the "Copy to Clipboard" button is there to be clicked. When I click it, however, the status message on the browser window reports: "Error on page" and nothing is copied to the clipboard.
One admittedly naive question I have (aside from how on earth do I get this to work?!?) is When, if at all, do I use/invoke the name of the vortex procedure ClipboardCopy that contains the Javascript procedure docopy()? Do I ever have to refer to that procedure by name? If so, where? (Obviously, I'm a neophyte at Javascript!)
My browser is IE, as I understand that this will not work on Firefox. My Texis version is Commercial Version 5.00.1090358162 20040720 (i686-unknown-linux2.4.2-64-32)
Vortex (server-side) is completely done and out of the picture by the time the javascript (client-side) is being executed. There's no way to invoke a vortex function from a javascript function.
If there is a solution, it will have to be pure javascript.