Click to See Complete Forum and Search --> : sending output to clipboard


super_dc
07-24-2003, 03:55 AM
I have the following function which is used to encrypt javascript. The function is called with the encrpted code and adds +30 to the ascii value, and hene decodes it to the variable (o). The question how can I pipe this out to the clipboard so I can extract the code. I can use the alert(o) command to pipe the output to an alert box but this can not be extracted as text.

Any ideas

Thanks in advance

function a(s){t="abcdefghijklmnopqrstuvwxyz0123456789 !#$%&'()*+,-./:;<=>?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZ";o=new String;l=s.length;for (i=0;i<l;i++){n=t.indexOf(s.charAt(i));if(n==-1){o+=s.charAt(i);continue}if(n==0){o+=String.fromCharCode(10);continue}if(n==1){o+=String.fromCharC ode(13);continue}if(n>1){o+=String.fromCharCode(n+30)}}document.write(o)}

Nevermore
07-24-2003, 05:45 AM
Put it in a text area.

super_dc
07-24-2003, 06:18 AM
What do you mean? - Put the actual function call in a text area or change the alert command to put into a text area?

Thanks

Dave

Nevermore
07-24-2003, 06:27 AM
Put the output into a text area.