469,303 Members | 2,025 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,303 developers. It's quick & easy.

Copy Text To Clipboard

I have an ASP page in which I want to copy the contents of a variable (text)
to the clipboard. Based on MSDN examples I tried

window.clipboardData.setData(strTemp)

and that generates an error that "window" is not declared

How do I get my ASP page to copy the data to a clupboard?

Wayne
Jul 19 '05 #1
7 7352
Might want to explain _why_ you want to copy it to the clipboard in the
first place as there's most likely, a better way of achieving it.

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I have an ASP page in which I want to copy the contents of a variable (text) to the clipboard. Based on MSDN examples I tried

window.clipboardData.setData(strTemp)

and that generates an error that "window" is not declared

How do I get my ASP page to copy the data to a clupboard?

Wayne

Jul 19 '05 #2
"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I have an ASP page in which I want to copy the contents of a variable
(text)
to the clipboard. Based on MSDN examples I tried

window.clipboardData.setData(strTemp)

and that generates an error that "window" is not declared

How do I get my ASP page to copy the data to a clupboard?


There is no notion of a "clipboard" (or a "window" for that matter) in ASP
server-side code.

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
Jul 19 '05 #3
Thanks for the responses. What I am trying to do is to collect a list of
email addresses and put it on the clipboard so the user can paste it into
their email app to send those addressees email.

Wayne

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I have an ASP page in which I want to copy the contents of a variable (text) to the clipboard. Based on MSDN examples I tried

window.clipboardData.setData(strTemp)

and that generates an error that "window" is not declared

How do I get my ASP page to copy the data to a clupboard?

Wayne

Jul 19 '05 #4
Just output it to a text area (ASP doesn't have a server-side clipboard.
You'd need to find a way to do it using JScript/Javascript etc, on the
client-side)

I'm a little curious though.... surely if the persons are sending e-mails to
the recipients, they already have the recipients address's?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:ui**************@TK2MSFTNGP10.phx.gbl...
Thanks for the responses. What I am trying to do is to collect a list of
email addresses and put it on the clipboard so the user can paste it into
their email app to send those addressees email.

Wayne

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I have an ASP page in which I want to copy the contents of a variable

(text)
to the clipboard. Based on MSDN examples I tried

window.clipboardData.setData(strTemp)

and that generates an error that "window" is not declared

How do I get my ASP page to copy the data to a clupboard?

Wayne


Jul 19 '05 #5
Just create a "mailto:" link with your list of email addresses as in:

<A HREF="mailto:ta*****@theirmail.com;ta*****@theirma il.com;">Send
emails</A>

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:ui**************@TK2MSFTNGP10.phx.gbl...
Thanks for the responses. What I am trying to do is to collect a list of
email addresses and put it on the clipboard so the user can paste it into
their email app to send those addressees email.

Wayne

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I have an ASP page in which I want to copy the contents of a variable

(text)
to the clipboard. Based on MSDN examples I tried

window.clipboardData.setData(strTemp)

and that generates an error that "window" is not declared

How do I get my ASP page to copy the data to a clupboard?

Wayne


Jul 19 '05 #6
Thanks for the additional replies.

The list of email addresses is the result of a couple of queries where the
user sets certain criteria. The list of email addresses can be well over
1,000 bytes and mailto cannot deal with any target string longer that 250
(been there - tried that). I suspect the JavaScript function is the best
alternative.

Wayne

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:ui**************@TK2MSFTNGP10.phx.gbl...
Thanks for the responses. What I am trying to do is to collect a list of
email addresses and put it on the clipboard so the user can paste it into
their email app to send those addressees email.

Wayne

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I have an ASP page in which I want to copy the contents of a variable

(text)
to the clipboard. Based on MSDN examples I tried

window.clipboardData.setData(strTemp)

and that generates an error that "window" is not declared

How do I get my ASP page to copy the data to a clupboard?

Wayne


Jul 19 '05 #7
Hello Wayne,

Did you find a way to get the content of your clipboard to your asp page?
After reading all the replies to your request, I guess none of them really
know how to do it. I've seen it done. I used an web application where
copied the source code of a web page from any site, then went to the browser
with the web application and pushed a button that will end up parsing all
the html to retrieve the data from the page. I'm looking for the same
functionality with no success. If I find it I'll let you know.

Good luck in your search.
"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:ui**************@TK2MSFTNGP10.phx.gbl...
Thanks for the responses. What I am trying to do is to collect a list of
email addresses and put it on the clipboard so the user can paste it into
their email app to send those addressees email.

Wayne

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I have an ASP page in which I want to copy the contents of a variable

(text)
to the clipboard. Based on MSDN examples I tried

window.clipboardData.setData(strTemp)

and that generates an error that "window" is not declared

How do I get my ASP page to copy the data to a clupboard?

Wayne


Sep 30 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Risto Heinonen | last post: by
2 posts views Thread by Hariharan Subramony | last post: by
6 posts views Thread by XmlAdoNewbie | last post: by
3 posts views Thread by Tor Inge Rislaa | last post: by
2 posts views Thread by Keith | last post: by
3 posts views Thread by SAL | last post: by
17 posts views Thread by Steve | last post: by
3 posts views Thread by =?Utf-8?B?cm9kY2hhcg==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.