Closed Thread Icon

Preserved Topic: Copy Content to the clipboard Pages that link to <a href="https://ozoneasylum.com/backlink?for=17853" title="Pages that link to Preserved Topic: Copy Content to the clipboard" rel="nofollow" >Preserved Topic: Copy Content to the clipboard\

 
Author Thread
WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 09-07-2000 01:15

Pugzly and myself have created a meta-tag creation tool for the gurus network. It is a pretty nifty tool that allows for a large amount of customization.

The script is written in perl, and then the information is diplayed into a text box.

We are wondering if there would be a way to add a button to the output page that, when clicked would copy the content of the Text Area to the clipboard. This would just be a simple copy command on the conent of the text area, but I am not sure if this can be done because of constraints that are placed on Javascript due to security reasons.

If it can not be done in javascript, then any hints or tips on how to do it in a different language, as in PERL or even Java would be nice.


www.warmage.org

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 02:15

No, not in JavaScript. However, you *could* pre-select the entire box, maybe. I'm not sure, I can look into it if you like...?

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 09-07-2000 02:37

That would be awsome!

Thanks slime <img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">


www.warmage.org

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 03:09

OK, I think this should work, stick it in the body onLoad="" tag or wherever you want it to be.

document.myform.mytextbox.select();

Hopefully, that will work... yeah, my JavaScript book says it should.

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 09-07-2000 03:37

Awsome, slime u da person.

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 09-07-2000 03:40

p.s. do you have to have the textbox named "mytextbox"

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-07-2000 03:53

Nope, just name it whatever you want, as long as the HTML code has name="nameoftextbox" in it.

And I think you meant, "You da slime." =D

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 09-11-2000 18:58

Well, I'd still like to explore the COPY TO CLIPBOARD idea a little further, if possible.

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-11-2000 23:13

I'm pretty sure it's not possible, pugzly. At least not in JavaScript. Unless there's some unstandardized function that does it, which would probably not be universally supported. You can always look into it if you're determined, of course!

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 09-11-2000 23:14

Rats!

Nah - I just thought it would be a cool little bonus to our tute.

Thanks for all the info...

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

« BackwardsOnwards »

Show Forum Drop Down Menu